[ROS] Solution to fix "Unable to handle 'index' format version '2', please update rosdistro" problem

[ROS] Use irobot create in gazebo with ROS

Author posted @ 2014年8月24日 10:08 in ROS with tags ubuntu ROS , 4568 阅读

So far there is no complete tutorial to guide users how to create an irobot create in gazeboros. I find a helpful answer from Saurav Agarwal at [1]. Based on his anwser, I post my steps here:

1. Install Gazebo_ros [2] an run it [3] (I assume you have ROS installed, so as the the catkin_workspace is also configured well)

2. Download the Irobot create SDF from OSRF's repo [4].

3. Unzip the downloaded file and copy the folder "create" into your catkin_ws/src directory. For me, I put it to ~/catkin_workspace/src/ directory.

4. Insert the differential drive plugin to the model-1_4.sdf file according to [5] (libgazebo_ros_diff_drive.so is already compiled in Hydro, use "roscd gazebo_plugins && cd lib " to see it)

     Note that, you have to make necessary changes from the plugin shown on [5]:

<model name="create">
<!-- other stuffs 

<plugin name="differential_drive_controller"     filename="libgazebo_ros_diff_drive.so">
    <!-- matching your left joint name -->
    <!-- matching your right joint name -->
    <!-- topic name published in the cpp file -->

5. In a terminal, run $roscore

6. Launch gazebo with an empty world using

roslaunch gazebo_ros empty_world.launch

7. In another terminial , spawn the create into gazebo usin command:

rosrun gazebo_ros  spawn_model -file ~/catkin_workspace/src/create/model-1_4.sdf -sdf -model create

So far you should be able to see the figure above.

8. To send commands manually to drive the robot, using

rostopic pub /cmd_vel geometry_msgs/Twist -- '[1.0, 0.0, 0.0]' '[0.0, 0.0, 1]'

9. To write a program constantly sending moving commands to the robot,  a demo program shown in [1] can be used. Codes are here: https://github.com/ysonggit/gazebo_simple

    type "catkin_make" to compile and in a new terminal, type "roscore && rosrun gazebo_simple gazebo_simple_node" to drive the robot 


    Note: I re-organized the folder on Aug 25th, so for the files used in article, you need run:

git clone https://github.com/ysonggit/gazebo_simple.git

    then run:

 git checkout f0f31534b87a35a63294860c9e8ae78de5223f4c


[1] How to use irobot create in gazebo with ROS hydro

[2] Install gazebo

[3] Run gazebo

[4] OSRF Model Lib

[5] Gazebo Plugin

memen 说:
2017年9月20日 03:46

very long antv streaming material, but interesting to try. thank you, I will immediately try it ... hopefully this article can be useful for everyone, streaming antv once again I say thank you

登录 *

loading captcha image...
or Ctrl+Enter