Isaac Sim ROS 2 Diff Drive Tuning: Conflict between High Damping (Stability) and Low Damping (Responsiveness)

Hello Community,

I am struggling to figure out the correct damping value for my custom differential drive robot. In the action graph, I have set the following values:
Differential controller Node:

As shown in the image, I have deliberately set the maxLinearSpeed and maxAngularSpeed parameters to 0 because I do not want these cap values to influence the movement of my robot. Instead, I want the ROS2 Nav2 stack parameters to influence the movement so that I can tune them as needed.

Angular Drive:


I have attached the angular drive and set the damping value to 1e9. The issue arises when the maxLinearSpeed and maxAngularSpeed are set to zero in the differential controller node (DCN). The robot goes out of control as soon as I play the scene and publish velocities via ros2_teleop_twist_keyboard or Nav2 stack. I believe this is due to the very high value of the damping, i.e., 1e9. If I reduce the damping gradually, the robot stays in place but does not rotate or stop after receiving the initial velocity, with no DCN cap values and with a lower damping value in the angular drive.

On the other hand, if I set cap values, for example, maxLinearVelocity=0.5 or even higher, the robot moves perfectly fine with both teleop_twist_keyboard and Nav2. Since I want to control the robot via Nav2 stack, I would like the parameters from controller_server and velocity_smoother nodes to influence the movement of the robot. for example with desired acceleration and velocity paramters from nav2_param file.

I have properly configured ros2 topics in isaac sim to be controlled via ros2.
/clock
/cmd_vel
/odom
/parameter_events
/realtimefactor
/rosout
/scan
/tf

Other information for reference:
Isaac Sim Version: 4.5
ROS version: humble
Linux version: 22.04.5
NVIDIA GeForce RTX 3090

Can anyone please help me figure out how can i set the paramters in isaac sim such that I am able to control the robot movement via ros2 nav2 stack only?

Thank you in advance for the support!

1 Like

Hello,

THE PROBLEM

The damping value is only partially responsible for the robot going out of control. The real issue lies within the Action Graph, more specifically the “Scale To/From Stage Units” node. This node scales the linear velocity input from “ROS2 Subscribe Twist” before it is passed into the “Differential Controller”.

Standard Action Graph:
isim_4.5_ros_tut_gui_ros2_turtlebot_graph.png (1801Ă—711)

This becomes a problem when the “ROS2 Subscribe Twist” velocity input is in centimeters, but your Isaac stage is not set to meters. If your Isaac stage metric is also set to centimeters, the “Scale To/From Stage Units” node will multiply your intended value by 100. Combined with high damping values, this leads your differential drive robot to reach very high speeds insanely fast, causing it to go out of control.

The reason why the program appeared to work once you set maxLinearVelocity = 0.5 is that, although the “Differential Controller” was still receiving high velocity values, they were rounded down to 0.5. This made it seem as though the robot was now receiving normal values.

THE SOLUTION

Fixing this issue is straightforward. I recommend deleting the “Scale To/From Stage Units” node and directly connecting the “ROS2 Subscribe Twist” node to the “Break 3-Vector” node. This removes the unnecessary scaling, which in your case multiplies values by 100 without need, since your input values from the “ROS2 Subscribe Twist” node and Isaac stage units use the same metric. After making this change, your robot should no longer go out of control and should operate correctly.

1 Like

Thanks for pointing out the root cause of the issue.
The Scale To/From Stage Units node was indeed confusing the differential controller node (DCN) together with high damping values in the joint. with zero cap values in DCN and with out Scale To/From Stage Units node i can map the input velocities to the odom/twist/velocities as it is.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.