I followed the Force Sensor — isaacsim latest documentation (nvidia.com) to read a force sensros value, but It occur a error: None Type object has no attribute ‘get_force_sensor_forces’
As the figure below, I have added a Articulation Force Sensor to the panda_rightfinger, but can not read the force value.
Hi @Robo_qq - The error message you’re seeing suggests that the object you’re trying to call
get_force_sensor_forces() on is
None. This typically happens when the object (in this case, probably a robot or a sensor) hasn’t been properly initialized or doesn’t exist in the scene.
Here are a few things you can check:
- Check the Initialization of the Object: Make sure that the object you’re trying to get the force sensor readings from is properly initialized. If you’re using an
RigidPrimViewto manage your robots, make sure that it’s correctly set up and that the robots have been added to it.
- Check the Existence of the Sensor: Ensure that the force sensor has been correctly added to the robot and that it exists in the scene. You can check this in the stage tree in the Omniverse Kit interface.
- Check the Timing of the Call: The
get_force_sensor_forces()function should be called after the physics simulation has started. If you’re calling it before the simulation starts, it might not return any data.
I have check the things you suggested, but it still not work, can you have a look to the figure?
The Atriculation Force Sensor have added to the “panda_rightfinger” and the simulation has started, you can see that there has force value showed on the right.
See this documentation please
you need to add the ArticulationView object to the scene and use its APIs only after the
Thanks , I have used usdapi to get the value
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.