Synchronizing between RViz and Gazebo

asked 2021-08-04 03:29:15 -0500

tucuman gravatar image

Hi community, I have problem with synchronizing between RViz and Gazebo.

I have a differential robot and work fine in Gazebo and RViz.Instead of use libgazebo_ros_diff_drive, i crteated two transmission (VelocityJointInterface) in my wheel left joint and wheel right joint.

To control robot, i wrote a node which subscribed /cmd_vel topic, and from linear vel I caculated wheel velocity. Then, i published it in two topic i created (/left_vel_controller/command, /right_vel_controller/command) and it nice worked.

Now, the node, i want add function caculate odometry which based wheel velocity. But have problem here is when i test, displacement of robot in world frame in gazebo different displacement in odom frame in RViz. Because the node need time to caculated odom and then publish.

Can anyone help me solve this problem?

Many thanks

edit retag flag offensive close merge delete