Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to control the Pioneer2dx model in Gazebo using ROS?

asked 2019-04-20 02:54:44 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-04-23 08:56:29 -0500

kumpakri gravatar image

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-04-20 02:54:44 -0500

Seen: 140 times

Last updated: Apr 23