ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Simulation of mobile base in gazebo is not visualizing in rviz

asked 2014-12-09 05:27:27 -0600

SVS gravatar image

Hi, I loaded a mobile base with differential drive in gazebo and I am able to control it in teleop mode. I tried to connect visualization to rviz. The robot is loaded fine in rviz . Wheels are rotating , but robot is not moving. Can any explain the reason?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-12-10 18:18:36 -0600

lucasw gravatar image

updated 2014-12-10 18:18:49 -0600

The rviz Global Options | Fixed Frame is set to base_link or the equivalent for your robot? If you set it to map and then don't see the robot properly then there needs to be something that publishes a transform between map and base_link.

You can 'cheat' and get the position from /gazebo/model_states and then publish it as a transform. The more realistic thing to do is implement odometry and have that publish the transform from there, though it will deviate from gazebo absolute position after a while (just as it would in real life).

edit flag offensive delete link more

Comments

I used differential drive plugin of gazebo.Inside that,there is odometry tag which publishes odom and it is publishing also.That odom topic can be selected from rviz without any errors. But it is not updating.

SVS gravatar image SVS  ( 2014-12-10 22:24:00 -0600 )edit

There is a package called gazebo2rviz. May be helpful to you.

AlexR gravatar image AlexR  ( 2014-12-12 08:19:10 -0600 )edit
1

answered 2014-12-09 23:00:33 -0600

130s gravatar image

updated 2014-12-10 00:07:50 -0600

Given tele-operatable somehow on Gazebo, I assume your robot is equipped with a contoroller. Since RViz wants joint_state topic to update the robot's external status, you might want to implement JointStateController-equivalent on your controller's end. If you use ros_control, this thread elaborates well.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-12-09 05:27:27 -0600

Seen: 486 times

Last updated: Dec 10 '14