This repository was archived by the owner on Jul 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 781
ROS 2 Migration: Diff drive
chapulina edited this page Aug 29, 2018
·
10 revisions
This pages describes the changes the diff drive plugin in gazebo_plugins for ROS 2, including a migration guide.
-
<publishWheelJointState>has been removed. Use thegazebo_ros_joint_state_publisherplugin instead. -
All SDF parameters are now
snake_cased:ROS 1 ROS 2 leftJointleft_jointrightJointright_jointwheelSeparationwheel_separationwheelDiameterwheel_diametercommandTopiccommand_topicodometryTopicodometry_topicodometryFrameodometry_framewheelTorquemax_wheel_torque
<model name='vehicle'>
...
<joint name='left_wheel_joint' type='revolute'>
...
</joint>
<joint name='right_wheel_joint' type='revolute'>
...
</joint>
<plugin name='diff_drive' filename='libgazebo_ros_diff_drive.so'>
<leftJoint>left_wheel_joint</leftJoint>
<rightJoint>right_wheel_joint</rightJoint>
<wheelSeparation>0.5380</wheelSeparation>
<wheelDiameter>0.3</wheelDiameter>
<wheelTorque>20</wheelTorque>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<publishWheelJointState>true</publishWheelJointState>
</plugin>
</model> <model name='vehicle'>
...
<joint name='left_wheel_joint' type='revolute'>
...
</joint>
<joint name='right_wheel_joint' type='revolute'>
...
</joint>
<!-- Use gazebo_ros_joint_state_publisher instead of publishWheelJointState -->
<plugin name="joint_states" filename="libgazebo_ros_joint_state_publisher.so">
<joint_name>right_wheel_joint</joint_name>
<joint_name>left_wheel_joint</joint_name>
</plugin>
<plugin name='diff_drive' filename='libgazebo_ros_diff_drive.so'>
<!-- Replace camelCase elements with camel_case ones -->
<left_joint>left_wheel_joint</left_joint>
<right_joint>right_wheel_joint</right_joint>
<wheel_separation>0.5380</wheel_separation>
<wheel_diameter>0.3</wheel_diameter>
<command_topic>cmd_vel</command_topic>
<odometry_topic>odom</odometry_topic>
<odometry_frame>odom</odometry_frame>
<!-- wheelTorque is now max_wheel_torque -->
<max_wheel_torque>20</max_wheel_torque>
</plugin>
</model>