Robotics StackExchange | Archived questions

How to control the Pioneer2dx model in Gazebo using ROS?

I'm new to Gazebo and ROS and I was interested in controlling the Pioneer2dx model in Gazebo using ROS by publishing to topics and so on. I have a Gazebo model open with a Pioneer2dx model but I can't find anything related to the model when I list the available ROS topics or nodes. I assume I have to do something to have the Pioneer2dx topics visible through ROS. I have read a little bit about plugins but I'm not aware how I can use them in this context.

Asked by yaseen.elzawahry on 2019-04-20 02:54:44 UTC

Comments

Answers

As far as I know, running Gazebo with ROS is little more complicated. I have seen the projects generarly organized into 3 packages

- robot_description
- robot_gazebo
- robot_control

You would put your URDF robot description into the robot_description package.

Definition of the gazebo world and launching files would be inside robot_gazebo package.

And the definition of the controllers inside robot_control package.

This repository is a perfect example of how it should look like.

When speaking specifically about the project in the repository, to launch the thing you have to use ROS command and launch the `robot_gazebo/launch/rrbot_world.launch'. You can change the 'robot' (in my explanation) or 'rrbot' (in this repository) to the name of your robot.

The launch command would be:

roslaunch robot_gazebo rrbot_world.launch 

When you launch the gazebo this way, the gazebo_ros package starts to publish gazebo messages onto ROS topics and you can send commands through this gazebo_ros package inside Gazebo and control the robot in the simulation.

Asked by kumpakri on 2019-04-23 08:56:29 UTC

Comments