码迷,mamicode.com
首页 > 其他好文 > 详细

Simulating a Freight in Gazebo

时间:2016-11-10 07:48:15      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:image   org   warning   src   test   href   utils   nal   param   

Installation

Before installing the simulation environment, make sure your desktop is setup with a standard installation of ROS Indigo on Ubuntu 14.04. Once your APT repositories are configured, you can install the simulator:

>$ sudo apt-get update
>$ sudo apt-get install ros-indigo-fetch-gazebo-demo

Warning

Never run the simulator on the robot. Simulation requires that the ROS parameter use_sim_time be set to true, which will cause the robot drivers to stop working correctly. In addition, be sure to never start the simulator in a terminal that has the ROS_MASTER_URI set to your robot for the same reasons.

Starting the Simulator

The fetch_gazebo and fetch_gazebo_demo packages provide the Gazebo environment for Fetch. fetch_gazebo includes several launch files:

  • simulation.launch spawns a robot in an empty world.
  • playground.launch spawns a robot inside a lab-like test environment. This environment has some tables with items that may be picked up and manipulated. It also has a pre-made map which can be used to test out robot navigation and some simple demonstrations of object grasping.

To start the simplest environment with Freight

>$ roslaunch fetch_gazebo simulation.launch robot:=freight
技术分享

Puzzle:  While I am using the default argument, I see the Fetch robot but without the lidar scan which I don‘t know why.

Adding a Brick wall to see how lidar scan works:

技术分享

Visualizing with RVIZ

Even though Gazebo has a graphical visualization, RVIZ is still the preferred tool for interacting with your robot.

>$ rosrun rviz rviz

技术分享

 

Simulating a Freight in Gazebo

标签:image   org   warning   src   test   href   utils   nal   param   

原文地址:http://www.cnblogs.com/casperwin/p/6049508.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!