Force sensor in Isaac Sim


I have an Isaac sim simulation with a Franka arm. I want to get FT data from the end effector. I looked at the Force sensor documentation in Isaac Sim docs and found that the only way to get Force sensor data is through python script.

The python script provided at the end of this page creates a world from script. However, in my case I am loading my world and stage through GUI buttons from a .usd file.

Could you please provide me with a script or resources with which I can create/use a FT sensor on an already loaded stage and stream the data in ROS network?

You can use your scene in a similar way. Just open Isaac Sim and use the script editor and the template snippet in the page above. Then replace the path to the asset in add_reference_to_stage function call with the local path to your USD. I recommend reading some of our ROS tutorials to get familiar with how to use omnigraph and ROS nodes to publish the joint data.

I did as you said and made necessary path changes in the script. The scene loads correctly.

When I run print(arti_view._articulation_view.joint_names) I get all the joint names associated with the franka.

But I get the following warnings and joint force data is not printed in the terminal.

I think the issue is in PhysicsScene.
Is there a way to load a PhysicsScene from a .usd file?
Also, Is there a way to load the scene in GUI first then get reference to the World and scene objects and proceed?

Also, in the Force sensor page, the following code snippet is written:

# read the applied joint efforts afer all the set operations
applied_joint_efforts = robots.get_applied_joint_efforts()

# read total overall joint forces and torques via
sensor_joint_forces = robots.get_measured_joint_forces()

# read the active component of the joint forces, i.e. the joint efforts via
sensor_actuation_efforts = robots.get_measured_joint_efforts()

Here, does the get_measured_joint_forces() give the FT data that a sensor would give i.e. passive FT or does it give passive FT + active FT?

you should be able to create the world with a specific physicScene prim via physics_prim_path , see the initializer of the World
get_measured_joint_forces will provide the sum of active and passive components of the force

Hi, I am able to run the script and get FT data.


I also tried using physics_prim_path to load pre-defined PhysicsScene. But for that I needed to make changes to the script as follows:

In the script we first create a world object then add our usd to the stage. If i need to use physics_prim_path then I need to add the usd in the stage before I create World object. If I am doing this, the Articulation object is not able to retrieve the franka prim. I think it is because whatever is added in the stage before the creation of world object is not captured by the world object.


However, if I use the script as it is I am getting FT data, but also this error:

2024-06-07 18:24:53 [Error] [omni.physx.plugin] PhysX error: PxScene::addRigidActor(): Rigid actors with SDFs are currently only supported with GPU-accelerated scenes!, FILE /buildAgent/work/eb2f45c4acc808a0/physx/source/physx/src/NpScene.cpp, LINE 899

Also, if I am giving any goal pose from Moveit, the robot in Isaac Sim is not moving. I think it is because of PhysicsScene using CPU.

I don’t get this error when I load the usd via GUI which uses a PhysicsScene where Broadphase Type is GPU and GPU dynamics is enabled.

Is there a way to set this in script itself?

If this error could be solved then I think I don’t have any further issues.

you can create the world with a GPU support with something like World(backend="torch", device="cuda")