Isaac-sim and ROS controller_manager

Hey all,

I have been trying to use Isaac-sim with the ROS controller_manager but so far without success. To be fair, I don’t fully understand how the ROS controller_manager works. To me it should take joints states in, shoot joint commands out. But apparently it needs something more…

[ WARN] [1634630138.145786902]: Received JointState is 1634628410.048216 seconds old.
[WARN] [1634630138.269975]: Controller Spawner couldn't find the expected controller_manager ROS interface.
[base_controller_spawner-1] process has finished cleanly
log file: /home/gpu_user/.ros/log/5ed28b12-30ae-11ec-92ee-b42e99f33eca/base_controller_spawner-1*.log

Did anyone manage to get the ROS controller_manager working as is with Isaac? Is using the controller manager recommended? Using it is clearly not necessary with Isaac, since Isaac already provides a joint command interface. But I figure this is not the most ROS way of doing things since it kills the compatibility with these tools.

Here is more information regarding my setup, I’m using ROS-melodic on Ubuntu 18.04. All the following works fine with Gazebo.

Here is the launch file, I have tried things like loading the robot_description file from the URDF file, but it doesn’t work.

<launch>
    <!-- Load controller configuration -->
    <rosparam command="load" file="$(find husky_control)/config/control.yaml" />

    <!-- Spawn controllers -->
    <node name="base_controller_spawner" pkg="controller_manager" type="spawner"
          args="husky_joint_publisher husky_velocity_controller"/>

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

    <node pkg="twist_mux" type="twist_mux" name="twist_mux">
      <rosparam command="load" file="$(find husky_control)/config/twist_mux.yaml" />
      <remap from="cmd_vel_out" to="husky_velocity_controller/cmd_vel"/>
    </node>
</launch>

Here is the configuration file:

husky_joint_publisher:
  type: "joint_state_controller/JointStateController"
  publish_rate: 50

husky_velocity_controller:
  type: "diff_drive_controller/DiffDriveController"
  left_wheel: ['front_left_wheel', 'rear_left_wheel']
  right_wheel: ['front_right_wheel', 'rear_right_wheel']
  publish_rate: 50
  pose_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.03]
  twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.03]
  cmd_vel_timeout: 0.25
  velocity_rolling_window_size: 2

  # Base frame_id
  base_frame_id: base_link

  # Odometry fused with IMU is published by robot_localization, so
  # no need to publish a TF based on encoders alone.
  enable_odom_tf: false

  # Husky hardware provides wheel velocities
  estimate_velocity_from_position: false

  # Wheel separation and radius multipliers
  wheel_separation_multiplier: 1.875 # default: 1.0
  wheel_radius_multiplier    : 1.0 # default: 1.0

  # Velocity and acceleration limits
  # Whenever a min_* is unspecified, default to -max_*
  linear:
    x:
      has_velocity_limits    : true
      max_velocity           : 1.0   # m/s
      has_acceleration_limits: true
      max_acceleration       : 3.0   # m/s^2
  angular:
    z:
      has_velocity_limits    : true
      max_velocity           : 2.0   # rad/s
      has_acceleration_limits: true
      max_acceleration       : 6.0   # rad/s^2

Here is a dump from the /joint_states

---
header: 
  seq: 264457
  stamp: 
    secs: 4409
    nsecs: 264344418
  frame_id: ''
name: [front_left_wheel, front_right_wheel, rear_left_wheel, rear_right_wheel]
position: [-0.00025040123728103936, -0.0002826738345902413, -0.00018943348550237715, -0.00021793755877297372]
velocity: [0.00011761963833123446, 0.0002730426494963467, 0.00012692707241512835, 0.0002798598725348711]
effort: [0.0, 0.0, 0.0, 0.0]
---

Here are the TFs published by the robot_state_publisher:

---
transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 4791
        nsecs: 197697671
      frame_id: "world"
    child_frame_id: "base_link"
    transform: 
      translation: 
        x: 0.0180044434965
        y: -0.00754821067676
        z: 0.131376713514
      rotation: 
        x: -6.05414970778e-06
        y: -4.94683627039e-06
        z: -0.0294107105583
        w: 0.999567508698
  - 
    header: 
      seq: 0
      stamp: 
        secs: 4791
        nsecs: 197697671
      frame_id: "base_link"
    child_frame_id: "front_left_wheel_link"
    transform: 
      translation: 
        x: 0.256000161171
        y: 0.285400182009
        z: 0.0328200384974
      rotation: 
        x: -1.22781784739e-11
        y: -0.000125801147078
        z: -7.42986561164e-10
        w: 1.00000011921
  - 
    header: 
      seq: 0
      stamp: 
        secs: 4791
        nsecs: 197697671
      frame_id: "base_link"
    child_frame_id: "front_right_wheel_link"
    transform: 
      translation: 
        x: 0.256000161171
        y: -0.285400152206
        z: 0.0328200310469
      rotation: 
        x: -1.54614099301e-11
        y: -0.000141398457345
        z: -2.69775024542e-09
        w: 1.00000011921
  - 
    header: 
      seq: 0
      stamp: 
        secs: 4791
        nsecs: 197697671
      frame_id: "base_link"
    child_frame_id: "rear_left_wheel_link"
    transform: 
      translation: 
        x: -0.256000190973
        y: 0.285400301218
        z: 0.0328200012445
      rotation: 
        x: -1.86446413863e-11
        y: -9.56292860792e-05
        z: -5.64790325619e-10
        w: 1.00000011921
  - 
    header: 
      seq: 0
      stamp: 
        secs: 4791
        nsecs: 197697671
      frame_id: "base_link"
    child_frame_id: "rear_right_wheel_link"
    transform: 
      translation: 
        x: -0.256000131369
        y: -0.285400122404
        z: 0.0328200310469
      rotation: 
        x: -1.50066625793e-11
        y: -0.000108784319309
        z: -2.50512965927e-09
        w: 1.00000011921
---

So everything seems to be working fine except for the controller_manager.

Thanks in advance,

Best,

Antoine

@antoine.richard is there a link to a tutorial/example you are following that I could also try to reproduce?