3. OmniGraph: Imu Sensor Node¶
3.1. Learning Objectives¶
This tutorial details how to attach an IMU sensor to a prim, and use the included Omniverse Isaac Sim OmniGraph nodes to read out data. After this tutorial, you will understand how to attach sensors to a simple robot and print out its IMU readings using OmniGraph.
10-15 Minute Tutorial
3.2. Getting Started¶
Review the GUI Tutorial series, specifically OmniGraph, prior to beginning this tutorial.
3.3. Adding the Simple Articulation¶
Begin by adding a Simple Articulation to the scene. The articulation file can be accessed via a Omniverse Nucleus Server in the content window. Connecting to this server allows allows you to access the library of Omniverse Isaac Sim robots, sensors, and environments.
After connecting to the server,
Navigate to localhost/NVIDIA/Assets/Isaac/2022.2.0/Isaac/Robots/Simple/ using the Content browser.
Drag simple_articulation.usd onto the World prim in the Stage UI window on the right hand side to add an instance into the environment.
To drive the revolute joint, in the Stage window, select the RevoluteJoint prim at /World/simple_articulation/Arm/RevoluteJoint, and scroll down to Drive in the Property window. Set the target velocity to 90 deg/s, and stiffness to 0.
The following video summarizes the above steps:
The server shown in these steps has been connected to in Isaac Sim First Run.
3.4. Adding the IMU Sensor¶
Now that your robot is set up, lets add an IMU sensor to it and collect some data!
In the Stage tab, navigate to the /World/simple_articulation/Arm prim and select it.
Next add the sensor to the prim by Create > Isaac > Sensors > Imu Sensor.
The newly added IMU sensor can be viewed by hitting the + button next to the Arm prim.
In general, sensors must be added to rigid body prims in order to correctly report data. The prims in this robot are already rigid bodies, so nothing must be done for this case.
Now lets set up the OmniGraph to collect readings from this sensor.
Create the new action graph by navigating to Window > Visual Scripting > Action Graph, and selecting New Action Graph in the new tab that opens.
Now add the following nodes to the graph, and set their properties as follows:
On Playback Tick node executes the graph nodes every simulation timestep.
Isaac Read IMU Node to get the IMU readings. In the Property tab, set IMU Prim to /World/simple_articulation/Arm/Imu_Sensor, to point to the location of the IMU sensor prim.
To String node to convert the IMU readings to string format.
Print Text node to print the string readings. In the Property tab, set Log Level to Warning so that messages are visible in the terminal/console by default
Connect the above nodes as follows to print out the Imu sensor reading:
Now hit the Play button on the GUI. If set up correctly, the Omniverse Isaac Sim internal Console should read out the IMU sensor’s angular velocity.