Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Answering my own question..thanks @gvdhoorn for editing my original question.

I figured out that DiffDriveController is the right controller for my purpose, and it works with gazebo_ros_control with a hardware_interface/VelocityJointInterface in the <transmission> tag of robot description.

### mybot_ros_control.yaml ###
# Joint  State Controller
  type: joint_state_controller/JointStateController
  publish_rate: 50  
# Differential Drive Controller
  type: "diff_drive_controller/DiffDriveController"
  left_wheel: 'left_wheel_joint'
  right_wheel: 'right_wheel_joint'
  pose_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0]
  twist_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0]
  # Base frame_id
  base_frame_id: base_footprint

Corresponding change to the launch command:

<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="mybot_base_controller joint_state_controller"/>

Above updates provide /cmd_vel topic to which velocity commands can be published to control the differential drive robot model in gazebo.