Skip to content

Commit 46d3b4a

Browse files
authored
Default ROS_DOMAIN_ID if not set for Isaac tutorial (#716)
1 parent f689924 commit 46d3b4a

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

doc/how_to_guides/isaac_panda/isaac_panda_tutorial.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ How To Command Simulated Isaac Robot
22
====================================
33

44
This tutorial requires a machine with ``Isaac Sim 2022.2.0`` or ``Isaac Sim 2022.2.1`` installed.
5-
For Isaac Sim requirements and installation please see the `Omniverse documentation <https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/overview.html>`_.
5+
For Isaac Sim requirements and installation please see the `Omniverse documentation <https://docs.omniverse.nvidia.com/isaacsim/latest/index.html>`_.
66

77
This tutorial has the following assumptions on system configuration:
88

@@ -56,19 +56,19 @@ updated to load the ``TopicBasedSystem`` plugin when the flag ``ros2_control_har
5656
</xacro:if>
5757
5858
In this tutorial we have included a Python script that loads a Panda robot
59-
and builds an `OmniGraph <https://docs.omniverse.nvidia.com/prod_extensions/prod_extensions/ext_omnigraph.html>`_
59+
and builds an `OmniGraph <https://docs.omniverse.nvidia.com/isaacsim/latest/tutorial_gui_omnigraph.html>`_
6060
to publish and subscribe to the ROS topics used to control the robot.
6161
The OmniGraph also contains nodes to publish RGB and Depth images from the camera mounted on the hand of the Panda.
6262
The RGB image is published to the topic ``/rgb``, the camera info to ``/camera_info``, and the depth image to ``/depth``.
6363
The frame ID of the camera frame is ``/sim_camera``.
6464
To learn about configuring your Isaac Sim robot to communicate with ROS 2 please see the
65-
`Joint Control tutorial <https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/tutorial_ros2_manipulation.html>`_
65+
`Joint Control tutorial <https://docs.omniverse.nvidia.com/isaacsim/latest/tutorial_ros2_manipulation.html>`_
6666
on Omniverse.
6767

6868
Computer Setup
6969
--------------
7070

71-
1. Install `Isaac Sim <https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/install_workstation.html>`_.
71+
1. Install `Isaac Sim <https://docs.omniverse.nvidia.com/isaacsim/latest/install_workstation.html>`_.
7272

7373
2. Perform a shallow clone of the MoveIt2 Tutorials repo.
7474

doc/how_to_guides/isaac_panda/launch/isaac_moveit.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@
113113

114114
simulation_app.update()
115115

116+
try:
117+
ros_domain_id = int(os.environ["ROS_DOMAIN_ID"])
118+
print("Using ROS_DOMAIN_ID: ", ros_domain_id)
119+
except ValueError:
120+
print("Invalid ROS_DOMAIN_ID integer value. Setting value to 0")
121+
ros_domain_id = 0
122+
except KeyError:
123+
print("ROS_DOMAIN_ID environment variable is not set. Setting value to 0")
124+
ros_domain_id = 0
125+
116126
# Creating a action graph with ROS component nodes
117127
try:
118128
og.Controller.edit(
@@ -203,7 +213,7 @@
203213
),
204214
],
205215
og.Controller.Keys.SET_VALUES: [
206-
("Context.inputs:domain_id", int(os.environ["ROS_DOMAIN_ID"])),
216+
("Context.inputs:domain_id", ros_domain_id),
207217
# Setting the /Franka target prim to Articulation Controller node
208218
("ArticulationController.inputs:usePath", True),
209219
("ArticulationController.inputs:robotPath", FRANKA_STAGE_PATH),

0 commit comments

Comments
 (0)