Robotics StackExchange | Archived questions

ros force based move plugin and unsynced gazebo and rviz motion

Hi guys,

I am working on a 4 mecannum wheel mobile robot. I have a kinetic installation on the RPi 3 on the robot and it is has nodes for motor driver, tebplanner for trajectory and path planning, move base to command on cmdvel. I have made a gazebo model and i can see the robot moving in rviz and gazebo which are running on my laptop which also has ROS kinetic.

There are no controllers applied and the whole robot just has fixed links

My problem is that Rviz and Gazebo movements are not synced. If robot yaws 90 degrees in rviz, it yaws more than 500 degrees in gazebo. The hectorgazebo force based move plugin for gazebo is subscribing to the same odom and cmdvel topics as the actual hardware.

i can see that changing the mu1 and mu2 values for the wheel link and the p gains in the plugin do have some effect on the motion

I am not sure if it is the P gain values in the plugin or the friction coefficients which needs to be fixed or something else is going wrong

 <gazebo>
<plugin name="base_controller" filename="libgazebo_ros_force_based_move.so">
        <commandTopic>base_node/cmd_vel</commandTopic>
        <odometryTopic>base_node/odom</odometryTopic>
        <odometryFrame>odom</odometryFrame>
        <robotBaseFrame>base_link</robotBaseFrame>
        <odometryRate>50.0</odometryRate>
        <cmdVelTimeOut>0.25</cmdVelTimeOut>
        <publishOdometryTf>0</publishOdometryTf>
            <yaw_velocity_p_gain>600.0</yaw_velocity_p_gain>
        <x_velocity_p_gain>5000.0</x_velocity_p_gain>
        <y_velocity_p_gain>5000.0</y_velocity_p_gain>
</plugin>

any help is appreciated! Thank you in advance!

Asked by HJaiswal on 2020-08-06 09:02:42 UTC

Comments

Answers

Referencing this question: https://answers.ros.org/question/332948/how-to-control-a-real-robot-and-simulate-it-in-gazebo-at-the-same-time/

there was something theoretically wrong with what i wanted to do.

Asked by HJaiswal on 2020-08-07 07:34:27 UTC

Comments