Skip to content

Commit 2a5b16d

Browse files
committed
Updates for Isaac Sim 4.1.0
1 parent d686d15 commit 2a5b16d

File tree

7 files changed

+53
-42
lines changed

7 files changed

+53
-42
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [1.1.0] - 2024-08-01
4+
5+
### Added
6+
- Option in `isaacsim` package to launch Isaac Sim in headless mode [Foxy, Humble]
7+
8+
### Changed
9+
- Bumped versions in `isaacsim` package to Isaac Sim version 4.1.0 [Foxy, Humble]
10+
11+
312
## [1.0.0] - 2024-05-28
413

514
### Added

foxy_ws/src/isaacsim/launch/run_isaacsim.launch.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Declare all launch arguments corresponding to the bash script options
1818
launch_args = [
19-
DeclareLaunchArgument('version', default_value='4.0.0', description='Specify the version of Isaac Sim to use. Isaac Sim will be run from default install root folder for the specified version. Leave empty to use latest version of Isaac Sim.'),
19+
DeclareLaunchArgument('version', default_value='4.1.0', description='Specify the version of Isaac Sim to use. Isaac Sim will be run from default install root folder for the specified version. Leave empty to use latest version of Isaac Sim.'),
2020

2121
DeclareLaunchArgument('install_path', default_value='', description='If Isaac Sim is insalled in a non-default location, provide a specific path to Isaac Sim installation root folder. (If defined, "version" parameter will be ignored)'),
2222

@@ -33,7 +33,9 @@
3333
DeclareLaunchArgument('ros_distro', default_value='foxy', description='Provide ROS version to use. Only Humble and Foxy is supported.'),
3434

3535
DeclareLaunchArgument('ros_installation_path', default_value='', description='If ROS is installed in a non-default location (as in not under /opt/ros/), provide the path to your main setup.bash file for your ROS install. (/path/to/custom/ros/install/setup.bash)'),
36-
36+
37+
DeclareLaunchArgument('headless', default_value='', description='Set to "native" or "webrtc" to run Isaac Sim with different headless modes, if left blank, Isaac Sim will run in the regular GUI workflow. This parameter can be overridden by "standalone" parameter.'),
38+
3739
]
3840

3941
# List of parameters to check
@@ -76,7 +78,8 @@ def add_parameter_argument(param_name, command_list):
7678
'standalone': LaunchConfiguration('standalone'),
7779
'play_sim_on_start': LaunchConfiguration('play_sim_on_start'),
7880
'ros_distro': LaunchConfiguration('ros_distro'),
79-
'ros_installation_path': LaunchConfiguration('ros_installation_path')
81+
'ros_installation_path': LaunchConfiguration('ros_installation_path'),
82+
'headless': LaunchConfiguration('headless')
8083
}]
8184
)
8285
return [isaacsim_node]

foxy_ws/src/isaacsim/scripts/run_isaacsim.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# NVIDIA CORPORATION and its licensors retain all intellectual property
66
# and proprietary rights in and to this software, related documentation
7-
# and any modifications thereto. Any use, reproduction, disclosure or
7+
# and any modifications thereto. Any use, reproduction, disclosure or
88
# distribution of this software and related documentation without an express
99
# license agreement from NVIDIA CORPORATION is strictly prohibited.
1010

@@ -13,23 +13,23 @@
1313
import argparse
1414
import os
1515
import subprocess
16-
from subprocess import run
1716
import signal
1817
import sys
1918
import atexit
2019
import psutil
2120

2221
# Default values
2322
defaults = {
24-
"isaac_sim_version": "4.0.0",
23+
"isaac_sim_version": "4.1.0",
2524
"isaac_sim_path": "",
2625
"use_internal_libs": False,
2726
"dds_type": "fastdds",
2827
"gui": "",
2928
"standalone": "",
3029
"play_sim_on_start": False,
3130
"ros_distro_var": "foxy",
32-
"ros_installation_path": ""
31+
"ros_installation_path": "",
32+
"headless": ""
3333
}
3434

3535
# List to keep track of subprocesses
@@ -41,16 +41,11 @@ def signal_handler(sig, frame):
4141
sys.exit(0)
4242

4343
def isaac_sim_shutdown():
44-
4544
for proc_id in subprocesses:
46-
4745
if sys.platform == "win32":
4846
os.kill(proc_id, signal.SIGTERM)
49-
5047
else:
5148
os.killpg(os.getpgid(proc_id), signal.SIGKILL)
52-
53-
5449
print("All subprocesses terminated.")
5550

5651
# Register the signal handler for SIGINT
@@ -85,6 +80,7 @@ def __init__(self):
8580
('play_sim_on_start', defaults['play_sim_on_start']),
8681
('ros_distro', defaults['ros_distro_var']),
8782
('ros_installation_path', defaults['ros_installation_path']),
83+
('headless', defaults['headless'])
8884
]
8985
)
9086
self.execute_launch()
@@ -100,17 +96,17 @@ def execute_launch(self):
10096
args.play_sim_on_start = self.get_parameter('play_sim_on_start').get_parameter_value().bool_value
10197
args.ros_distro = self.get_parameter('ros_distro').get_parameter_value().string_value
10298
args.ros_installation_path = self.get_parameter('ros_installation_path').get_parameter_value().string_value
99+
args.headless = self.get_parameter('headless').get_parameter_value().string_value
103100

104101
filepath_root = ""
105102

106103
if args.install_path != "":
107-
filepath_root = args.install_path
104+
filepath_root = args.install_path
108105
else:
109106
# If custom Isaac Sim Installation folder not given, use the default path using version number provided.
110107
home_var = "USERPROFILE" if sys.platform == "win32" else "HOME"
111108
home_path = os.getenv(home_var)
112-
113-
if version_ge(args.version, "4.0.0") and not version_gt(args.version, "2021.2.0"):
109+
if version_ge(args.version, "4.1.0") and not version_gt(args.version, "2021.2.0"):
114110
if sys.platform == "win32":
115111
filepath_root = os.path.join(home_path, "AppData", "Local", "ov", "pkg", f"isaac-sim-{args.version}")
116112
else:
@@ -140,7 +136,6 @@ def execute_launch(self):
140136

141137
elif args.ros_installation_path:
142138
# If a custom ros installation path is provided
143-
144139
if sys.platform == "win32":
145140
proc = subprocess.Popen(f"call {args.ros_installation_path}", shell=True, start_new_session=True)
146141
subprocesses.append(proc.pid)
@@ -149,17 +144,21 @@ def execute_launch(self):
149144
subprocesses.append(proc.pid)
150145

151146
os.environ["RMW_IMPLEMENTATION"] = "rmw_cyclonedds_cpp" if args.dds_type == "cyclonedds" else "rmw_fastrtps_cpp"
152-
153147
play_sim_on_start_arg = "--start-on-play" if args.play_sim_on_start else ""
154148

155149
if args.standalone != "":
156150
executable_path = os.path.join(filepath_root, "python.sh" if sys.platform != "win32" else "python.bat")
157-
158151
proc = subprocess.Popen(f"{executable_path} {args.standalone}", shell=True, start_new_session=True)
159152
subprocesses.append(proc.pid)
160153
else:
154+
# Default command
161155
executable_command = f'{os.path.join(filepath_root, "isaac-sim.sh" if sys.platform != "win32" else "isaac-sim.bat")} --/isaac/startup/ros_bridge_extension=omni.isaac.ros2_bridge'
162156

157+
if args.headless == "native":
158+
executable_command = f'{os.path.join(filepath_root, "isaac-sim.headless.native.sh" if sys.platform != "win32" else "isaac-sim.headless.native.bat")} --/isaac/startup/ros_bridge_extension=omni.isaac.ros2_bridge'
159+
elif args.headless == "webrtc":
160+
executable_command = f'{os.path.join(filepath_root, "isaac-sim.headless.webrtc.sh" if sys.platform != "win32" else "isaac-sim.headless.webrtc.bat")} --/isaac/startup/ros_bridge_extension=omni.isaac.ros2_bridge'
161+
163162
if args.gui != "":
164163
script_dir = os.path.dirname(__file__)
165164
file_arg = os.path.join(script_dir, "open_isaacsim_stage.py") + f" --path {args.gui} {play_sim_on_start_arg}"
@@ -174,7 +173,6 @@ def main(args=None):
174173
rclpy.init(args=args)
175174
isaac_sim_launcher_node = IsaacSimLauncherNode()
176175
rclpy.spin(isaac_sim_launcher_node)
177-
178176
# Ensure all subprocesses are terminated before exiting
179177
isaac_sim_shutdown()
180178
isaac_sim_launcher_node.destroy_node()

foxy_ws/src/navigation/carter_navigation/launch/carter_navigation_isaacsim.launch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def execute_second_node_if_condition_met(event, second_node_action):
6363
return LaunchDescription(
6464
[
6565
# Declaring the Isaac Sim scene path. 'gui' launch argument is already used withing run_isaac_sim.launch.py
66-
DeclareLaunchArgument("gui", default_value='omniverse://localhost/NVIDIA/Assets/Isaac/4.0/Isaac/Samples/ROS2/Scenario/carter_warehouse_navigation.usd', description="Path to isaac sim scene"),
66+
DeclareLaunchArgument("gui", default_value='omniverse://localhost/NVIDIA/Assets/Isaac/4.1/Isaac/Samples/ROS2/Scenario/carter_warehouse_navigation.usd', description="Path to isaac sim scene"),
6767

6868
# Include Isaac Sim launch file from isaacsim package with given launch parameters.
6969
IncludeLaunchDescription(
@@ -73,7 +73,7 @@ def execute_second_node_if_condition_met(event, second_node_action):
7373
]
7474
),
7575
launch_arguments={
76-
'version': '4.0.0',
76+
'version': '4.1.0',
7777
'play_sim_on_start': 'true',
7878
}.items(),
7979
),

humble_ws/src/isaacsim/launch/run_isaacsim.launch.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Declare all launch arguments corresponding to the bash script options
1818
launch_args = [
19-
DeclareLaunchArgument('version', default_value='4.0.0', description='Specify the version of Isaac Sim to use. Isaac Sim will be run from default install root folder for the specified version. Leave empty to use latest version of Isaac Sim.'),
19+
DeclareLaunchArgument('version', default_value='4.1.0', description='Specify the version of Isaac Sim to use. Isaac Sim will be run from default install root folder for the specified version. Leave empty to use latest version of Isaac Sim.'),
2020

2121
DeclareLaunchArgument('install_path', default_value='', description='If Isaac Sim is insalled in a non-default location, provide a specific path to Isaac Sim installation root folder. (If defined, "version" parameter will be ignored)'),
2222

@@ -33,7 +33,9 @@
3333
DeclareLaunchArgument('ros_distro', default_value='humble', description='Provide ROS version to use. Only Humble and Foxy is supported.'),
3434

3535
DeclareLaunchArgument('ros_installation_path', default_value='', description='If ROS is installed in a non-default location (as in not under /opt/ros/), provide the path to your main setup.bash file for your ROS install. (/path/to/custom/ros/install/setup.bash)'),
36-
36+
37+
DeclareLaunchArgument('headless', default_value='', description='Set to "native" or "webrtc" to run Isaac Sim with different headless modes, if left blank, Isaac Sim will run in the regular GUI workflow. This parameter can be overridden by "standalone" parameter.'),
38+
3739
]
3840

3941
# List of parameters to check
@@ -76,7 +78,8 @@ def add_parameter_argument(param_name, command_list):
7678
'standalone': LaunchConfiguration('standalone'),
7779
'play_sim_on_start': LaunchConfiguration('play_sim_on_start'),
7880
'ros_distro': LaunchConfiguration('ros_distro'),
79-
'ros_installation_path': LaunchConfiguration('ros_installation_path')
81+
'ros_installation_path': LaunchConfiguration('ros_installation_path'),
82+
'headless': LaunchConfiguration('headless')
8083
}]
8184
)
8285
return [isaacsim_node]

humble_ws/src/isaacsim/scripts/run_isaacsim.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@
1313
import argparse
1414
import os
1515
import subprocess
16-
from subprocess import run
1716
import signal
1817
import sys
1918
import atexit
2019
import psutil
2120

2221
# Default values
2322
defaults = {
24-
"isaac_sim_version": "4.0.0",
23+
"isaac_sim_version": "4.1.0",
2524
"isaac_sim_path": "",
2625
"use_internal_libs": False,
2726
"dds_type": "fastdds",
2827
"gui": "",
2928
"standalone": "",
3029
"play_sim_on_start": False,
31-
"ros_distro_var": "humble",
32-
"ros_installation_path": ""
30+
"ros_distro_var": "foxy",
31+
"ros_installation_path": "",
32+
"headless": ""
3333
}
3434

3535
# List to keep track of subprocesses
@@ -41,16 +41,11 @@ def signal_handler(sig, frame):
4141
sys.exit(0)
4242

4343
def isaac_sim_shutdown():
44-
4544
for proc_id in subprocesses:
46-
4745
if sys.platform == "win32":
4846
os.kill(proc_id, signal.SIGTERM)
49-
5047
else:
5148
os.killpg(os.getpgid(proc_id), signal.SIGKILL)
52-
53-
5449
print("All subprocesses terminated.")
5550

5651
# Register the signal handler for SIGINT
@@ -85,6 +80,7 @@ def __init__(self):
8580
('play_sim_on_start', defaults['play_sim_on_start']),
8681
('ros_distro', defaults['ros_distro_var']),
8782
('ros_installation_path', defaults['ros_installation_path']),
83+
('headless', defaults['headless'])
8884
]
8985
)
9086
self.execute_launch()
@@ -100,17 +96,17 @@ def execute_launch(self):
10096
args.play_sim_on_start = self.get_parameter('play_sim_on_start').get_parameter_value().bool_value
10197
args.ros_distro = self.get_parameter('ros_distro').get_parameter_value().string_value
10298
args.ros_installation_path = self.get_parameter('ros_installation_path').get_parameter_value().string_value
99+
args.headless = self.get_parameter('headless').get_parameter_value().string_value
103100

104101
filepath_root = ""
105102

106103
if args.install_path != "":
107-
filepath_root = args.install_path
104+
filepath_root = args.install_path
108105
else:
109106
# If custom Isaac Sim Installation folder not given, use the default path using version number provided.
110107
home_var = "USERPROFILE" if sys.platform == "win32" else "HOME"
111108
home_path = os.getenv(home_var)
112-
113-
if version_ge(args.version, "4.0.0") and not version_gt(args.version, "2021.2.0"):
109+
if version_ge(args.version, "4.1.0") and not version_gt(args.version, "2021.2.0"):
114110
if sys.platform == "win32":
115111
filepath_root = os.path.join(home_path, "AppData", "Local", "ov", "pkg", f"isaac-sim-{args.version}")
116112
else:
@@ -140,7 +136,6 @@ def execute_launch(self):
140136

141137
elif args.ros_installation_path:
142138
# If a custom ros installation path is provided
143-
144139
if sys.platform == "win32":
145140
proc = subprocess.Popen(f"call {args.ros_installation_path}", shell=True, start_new_session=True)
146141
subprocesses.append(proc.pid)
@@ -149,17 +144,21 @@ def execute_launch(self):
149144
subprocesses.append(proc.pid)
150145

151146
os.environ["RMW_IMPLEMENTATION"] = "rmw_cyclonedds_cpp" if args.dds_type == "cyclonedds" else "rmw_fastrtps_cpp"
152-
153147
play_sim_on_start_arg = "--start-on-play" if args.play_sim_on_start else ""
154148

155149
if args.standalone != "":
156150
executable_path = os.path.join(filepath_root, "python.sh" if sys.platform != "win32" else "python.bat")
157-
158151
proc = subprocess.Popen(f"{executable_path} {args.standalone}", shell=True, start_new_session=True)
159152
subprocesses.append(proc.pid)
160153
else:
154+
# Default command
161155
executable_command = f'{os.path.join(filepath_root, "isaac-sim.sh" if sys.platform != "win32" else "isaac-sim.bat")} --/isaac/startup/ros_bridge_extension=omni.isaac.ros2_bridge'
162156

157+
if args.headless == "native":
158+
executable_command = f'{os.path.join(filepath_root, "isaac-sim.headless.native.sh" if sys.platform != "win32" else "isaac-sim.headless.native.bat")} --/isaac/startup/ros_bridge_extension=omni.isaac.ros2_bridge'
159+
elif args.headless == "webrtc":
160+
executable_command = f'{os.path.join(filepath_root, "isaac-sim.headless.webrtc.sh" if sys.platform != "win32" else "isaac-sim.headless.webrtc.bat")} --/isaac/startup/ros_bridge_extension=omni.isaac.ros2_bridge'
161+
163162
if args.gui != "":
164163
script_dir = os.path.dirname(__file__)
165164
file_arg = os.path.join(script_dir, "open_isaacsim_stage.py") + f" --path {args.gui} {play_sim_on_start_arg}"
@@ -174,7 +173,6 @@ def main(args=None):
174173
rclpy.init(args=args)
175174
isaac_sim_launcher_node = IsaacSimLauncherNode()
176175
rclpy.spin(isaac_sim_launcher_node)
177-
178176
# Ensure all subprocesses are terminated before exiting
179177
isaac_sim_shutdown()
180178
isaac_sim_launcher_node.destroy_node()

humble_ws/src/navigation/carter_navigation/launch/carter_navigation_isaacsim.launch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def execute_second_node_if_condition_met(event, second_node_action):
6363
return LaunchDescription(
6464
[
6565
# Declaring the Isaac Sim scene path. 'gui' launch argument is already used withing run_isaac_sim.launch.py
66-
DeclareLaunchArgument("gui", default_value='omniverse://localhost/NVIDIA/Assets/Isaac/4.0/Isaac/Samples/ROS2/Scenario/carter_warehouse_navigation.usd', description="Path to isaac sim scene"),
66+
DeclareLaunchArgument("gui", default_value='omniverse://localhost/NVIDIA/Assets/Isaac/4.1/Isaac/Samples/ROS2/Scenario/carter_warehouse_navigation.usd', description="Path to isaac sim scene"),
6767

6868
# Include Isaac Sim launch file from isaacsim package with given launch parameters.
6969
IncludeLaunchDescription(
@@ -73,7 +73,7 @@ def execute_second_node_if_condition_met(event, second_node_action):
7373
]
7474
),
7575
launch_arguments={
76-
'version': '4.0.0',
76+
'version': '4.1.0',
7777
'play_sim_on_start': 'true',
7878
}.items(),
7979
),

0 commit comments

Comments
 (0)