Hi all,
I have been investigating the Odometry2Proto message using Isaac Sim and I am seeing some issues with the output I am receiving.
In essence it appears that if there is lag in unreal (due to having to render multiple people at once etc.) this is not accommodated for in the odometry messages I receive (assumes robot has moved at given expected speed).
The net result is that I can be spinning in a circle and the odometry thinks I have spun around 3 times in the time it took me to spin around once.
Is there any advice as to how I can deal with lag in the simulator and still receive odometry information that matches what is seen in the simulator?
Further information about my process below:
Inside my Odometry2Proto message I am trying to use odomTRobot to get the rotation angle of my robot within Isaac Sim just to get a feel for how things work.
Using the carter_sim_joystick app as the basis for things I connected the base_simulation/isaac.flatsim.DifferentialBaseSimulator/diff_base_state to the state channel of an isaac::navigation::DifferentialBaseOdometry node.
I then created my own codelet to take information from the odometry channel of the DifferentialBaseOdometry node and then print the Odometry2Proto message information to the screen etc.
I am printing several messages to the screen but the important lines of the code for this issue are as follows:
Pose2dProto::Reader odom_tf = proto_reader.getOdomTRobot();
SO2dProto::Reader odom_tf_rotation = odom_tf.getRotation();
// print raw odomTRobot rotation information
std::cout << "odomTRobot: Rotation - [ " << odom_tf_rotation.getQ().getX();
std::cout << ", " << odom_tf_rotation.getQ().getY() << " ]\n";
With the printed output on one screen and the simulator on the other I control the robot with the joystick in the Hospital environment and simply make the robot spin.
The result is that I see the numbers printed on the screen change at a steady rate whereas the simulator visualizer occassionally slows down dramatically or freezes (sometimes I get a warning message saying the screen is rendering at less than 10 fps).
Furthermore, I see the start state (odomTRobot: Rotation - [1,0]) is reached 3 times in my printed output before I appear to have spun a full 360 degrees as seen in the simulator.