Cannot ROS2 Publish contact sensor values properly

I am trying to Publish contact sensor values in ROS 2 using Omnigraph as shown in the attached image.

I am able to Publish in ROS 2 with this setup, but when I subscribe to the data with $ ros2 topic echo, I get very small numbers as shown below.

---
data: 5.439686476e-315
---
data: 5.439686476e-315
---
data: 5.439686476e-315
---
data: 5.439686476e-315

the contact sensor value is converted to String on Isaac Sim and the Printed value is 20. Why do these differences occur?

Isaac Sim Version

  • 4.5.0

Operating System

  • Ubuntu 22.04

GPU Information

  • Model: RTX4080

Hi @yuki_robot!
In OmniGraph, float is Float32 while double is Float64. If you check the tutorial for Isaac Read Contact Sensor Node, the force value is float which is Float32.

So in ROS2 publisher node, please use Float32 for the messageName.

I tried it out and it can publish correct data

zhengwang@zhengwang-isaac:~/isaacsim$ ros2 topic echo /contact_sensor 
data: 9809.9716796875
---
data: 9809.89453125
---
data: 9810.1455078125
---
data: 9809.9140625

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