Gazebo model messed up with ros_control & JointVelocityController
Using ros_control controller manager, I'm trying to actuate wheels of a differential drive 'car-like' robot in Gazebo. I would like to publish velocity commands on JointVelocityController
(of both wheels).
MYBOT_CONTROL.yaml
:
*// Publish all joint states
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
// Velocity Controllers
left_wheel_velocity_controller:
type: effort_controllers/JointVelocityController
joint: left_wheel_joint
pid: {p: 100.0, i: 0.01, d: 10.0}
right_wheel_velocity_controller:
type: effort_controllers/JointVelocityController
joint: right_wheel_joint
pid: {p: 100.0, i: 0.01, d: 10.0}*
In my launch file, the controller_manager is invoked :
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="left_wheel_velocity_controller right_wheel_velocity_controller joint_state_controller"/>
With above setup, the robot model in Gazebo is deformed. Left wheel, right wheel & caster all appear at the center of the robot base.
However, when I replace JointVelocityController
with JointPositionController
, the robot model appears fine.
With that background, a few questions-
- Is
JointVelocityController
supported by ros_control + Gazebo? - Is it the right way to control a diff drive robot?
Thanks