Issues getting accurate Odometry from Isaac Sim

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.

Hi D20,

Sorry for the late reply
What is the fps while you are simulating?
That is true if the simulation fps falles lower that a threshold, the information will be missed, and the odometry value will not be accurate.

The fps should be around 30 at all time.

hope this helps,
Liila

Hi there Liila,

Sorry for a likewise delayed response :p.

The framerate of the simulation seems to fluctuate a fair bit depending on what is on screen (namely how many moving actors are in view).

When there is no moving actors and it is just my robot in an empty location it is close to if not 30 fps. When there are others in the scene the framerate can drop to 10 fps.

Is there any way of getting consistency between what the odometry reading thinks is going on vs. what the renderer shows to be going on? That way I am not at the mercy of framerate drops caused by the simulator.

Hi d20,

As I mentioned before, the frame rate should never oscillate that much, it should always be around 30!
Why are you getting such a low fps!
Even with actors the fps should not go lower than 27ish.

With fps around 10 anything bad could happen.

What is you machine configuration?

Thanks,
Liila

Hi Liila,

I am running Ubuntu 18.04 and my CPU and Graphics info is as follows:

CPU: Quad core Intel Core i7-6700 (-MT-MCP-) cache: 8192 KB
clock speeds: max: 4000 MHz 1: 800 MHz 2: 800 MHz 3: 800 MHz
4: 800 MHz 5: 800 MHz 6: 800 MHz 7: 800 MHz 8: 800 MHz
Graphics: Card: NVIDIA GP104 [GeForce GTX 1070]
Display Server: x11 (X.Org 1.20.1 )
drivers: nvidia (unloaded: modesetting,fbdev,vesa,nouveau)
Resolution: 1920x1080@60.00hz, 1920x1080@60.00hz
OpenGL: renderer: GeForce GTX 1070/PCIe/SSE2
version: 4.6.0 NVIDIA 418.56

Any ideas what is going wrong with my system?

Let me know if you need anything else.

Hi d20,

I guess you don’t have Vulkan, as mentioned in the doc Vulkan is necessary.
Do you Vukan on your machine?
Isaac sim only gets the desired fps with Vulkan.

Thanks,
Liila

Hi Liila,

I have Vulkan installed.

I can run vulkaninfo | less to get output like shown below

==========
VULKANINFO
==========

Vulkan Instance Version: 1.1.101



Instance Extensions:
====================
Instance Extensions     count = 16
        VK_EXT_acquire_xlib_display         : extension revision  1
        VK_EXT_debug_report                 : extension revision  9
        VK_EXT_debug_utils                  : extension revision  1
        VK_EXT_direct_mode_display          : extension revision  1
        VK_EXT_display_surface_counter      : extension revision  1
        VK_KHR_device_group_creation        : extension revision  1
        VK_KHR_display                      : extension revision 21
        VK_KHR_external_fence_capabilities  : extension revision  1
        VK_KHR_external_memory_capabilities : extension revision  1
        VK_KHR_external_semaphore_capabilities: extension revision  1
        VK_KHR_get_display_properties2      : extension revision  1
        VK_KHR_get_physical_device_properties2: extension revision  1
        VK_KHR_get_surface_capabilities2    : extension revision  1
        VK_KHR_surface                      : extension revision 25
        VK_KHR_xcb_surface                  : extension revision  6
        VK_KHR_xlib_surface                 : extension revision  6
Layers: count = 12
=======
VK_LAYER_GOOGLE_threading (Google Validation Layer) Vulkan version 1.1.101, layer version 1
        Layer Extensions        count = 1
                VK_EXT_debug_report                 : extension revision  6
        Devices         count = 1
                GPU id       : 0 (GeForce GTX 1070)
                Layer-Device Extensions count = 0

VK_LAYER_GOOGLE_unique_objects (Google Validation Layer) Vulkan version 1.1.101, layer version 1
        Layer Extensions        count = 0
        Devices         count = 1
                GPU id       : 0 (GeForce GTX 1070)
                Layer-Device Extensions count = 0

VK_LAYER_LUNARG_api_dump (LunarG debug layer) Vulkan version 1.1.101, layer version 2
        Layer Extensions        count = 0
        Devices         count = 1
                GPU id       : 0 (GeForce GTX 1070)
                Layer-Device Extensions count = 0

Any other ideas about what I may have set up incorrectly to be getting such low fps?

Hi d20,

I am very sorry for my late reply.
Ok I see that you have vulkan installed.
But it seems that your GPU is GeForce 1070 which is slower than the minimum GPU required.

I have 2 suggestion for you:

  1. Get the latest Isaac Sim (2019-2), we have improved the perf, so you might get a reasonable fps on you machine.

  2. If you don’t care for the characters walking around, reduce the number of them, as they are one the big perf eaters. (instructions are in the character plugin section).

Hope this helps,
Liila

Hi there,

Sorry for the delay. Upgrading to Isaac Sim 2019.2 seemed to greatly improve the framerate issues thank you.

I still have some drift in Odometry that I am currently putting down to noise in the simulated sensor.

Is there a way I can remove all noise and get the ground-truth location and speed of the robot within the simulator.

Currently i have tried directly querying the pose tree to get worldTrobot but I am finding that even when I keep the robot completely stationary, the Pose3 that I get changes slightly over time. Is that likely something I am doing wrong or an inherent part of the simulator? The change is definitely not particularly significant but when I collect robotTleft_camera there is no change whatsoever and I just want to check there is no way to get a more “stable” ground-truth than what I have here when comparing to the odometry outputs that I receive.

Details of above setup

Testing in Hospital Map with personalized code that should not move the robot at all (entirely dependent on joystick controls).

Code for getting robot pose (print pose is simplistic code written to visualize pose):

std::optional<Pose3d> temp_robot_pose = node()->pose().tryGet("world", "robot", node()->clock()->timestamp());
  if (temp_robot_pose){
    std::cout << "--------------------------------------------------------------" << std::endl;
    print_pose(*temp_robot_pose);
    std::cout << "==============================================================-" << std::endl;
  }

worldTRobot at 0:
Translation: {X: 48.3276, Y: 5.37442, Z: 0}
RPY: {Roll: -0, Pitch: 0, Yaw: -0.131987}
Quaternion: {W: 0.997823, X: -0, Y: -0, Z: -0.0659456}

worldTRobot at 1 min:

Translation: {X: 48.2667, Y: 5.37686, Z: 0}
RPY: {Roll: -0, Pitch: 0, Yaw: -0.114357}
Quaternion: {W: 0.998366, X: -0, Y: -0, Z: -0.0571474}

OK in general Odometry looks more accurate now that the framerate has increased with Isaac 2019.2. I have moved the above query to it’s own topic and we will call this solved for now.

Hi d20,

Good to hear that.

Thanks,
Liila