Gazebo | Ignition | Community
Ask Your Question
0

Problem using Gazebo with ROS

asked 2013-01-16 04:05:31 -0500

camilla gravatar image

I'm developing a node which controls the navigation of a p3dx equipped with a laser rangefinder.
I'm simulating the navigation in Gazebo and also in rviz, to see the ranges detected by the laser.
But what the p3dx does in gazebo is different from what it does in rviz. The navigation displayed in rviz is correct, instead the one in gazebo isn't.
How is it possible?
I'm using pioneer3dx.gazebo.launch:

<launch>

  <include file="$(find gazebo_worlds)/launch/empty_world.launch"/>

  <include file="$(find p2os_urdf_mod)/launch/upload_pioneer3dx.xml"/>

  <!-- push robot_description to factory and spawn robot in gazebo -->
  <node name="spawn_pioneer" pkg="gazebo" type="spawn_model" 
    args="-z 0.051 
          -urdf 
          -param robot_description  
          -model robot_description" 
    respawn="false" output="screen" />

  <!-- Controller Manager -->
  <include file="$(find pr2_controller_manager)/controller_manager.launch" />

  <!-- load controllers -->
  <node name="diffdrive" pkg="gazebo_plugins" type="gazebo_ros_diffdrive" respawn="true" output="screen"/>


</launch>

The node that I developed reads some parameters about the desired trajectory and publishes the correct linear and angular speed on the topic /cmd_vel.
I checked the odometry published by "gazebo_ros_diffdrive" controller on the topic /base_pose_ground_truth and it is coherent with what i see in rviz.
Any suggestion? Is it possible that the reason for this is that in Gazebo are taken into account some effects as friction, or gravity which aren't considered in rviz?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-01-16 10:05:04 -0500

joq gravatar image

Gazebo is a 3D simulator, rviz is a ROS visualization tool.

The navigation goals and data provided by rviz are communicated with gazebo via ROS various topics.

edit flag offensive delete link more

Comments

Yes I know, but I can see the robot moving also in rviz and what I see there is different from what I see in gazebo, further more if I look at the values published on the /odom topic they're coherent with the position of the robot in rviz but not with the one that the robot has in Gazebo.

camilla gravatar imagecamilla ( 2013-01-17 01:38:26 -0500 )edit

Gazebo is displaying its simulation of "ground truth". Rviz displays the robot's current belief.

joq gravatar imagejoq ( 2013-09-24 22:15:43 -0500 )edit
0

answered 2013-01-23 23:14:37 -0500

nkoenig gravatar image

Can you elaborate some more? What exactly are the differences that you're seeing? A video would also be very helpful.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-16 04:05:31 -0500

Seen: 1,884 times

Last updated: Jan 23 '13