-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from NVIDIA-ISAAC-ROS/release-2.1
Isaac ROS 2.1.0
- Loading branch information
Showing
8 changed files
with
181 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
topics: | ||
- | ||
topic: /ros1_input_bridge_image # Topic name for ros1 bridge | ||
type: isaac_ros_nitros_bridge_interfaces/msg/NitrosBridgeImage # Type type for ros1 bridge | ||
queue_size: 10 | ||
- | ||
topic: /ros1_output_bridge_image # Topic name for ros1 bridge | ||
type: isaac_ros_nitros_bridge_interfaces/msg/NitrosBridgeImage # Type type for ros1 bridge | ||
queue_size: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
isaac_ros_nitros_bridge_ros1/launch/isaac_ros_image_converter.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
|
||
<launch> | ||
<node pkg="nodelet" | ||
type="nodelet" | ||
name="standalone_nodelet" | ||
args="manager" | ||
output="screen"/> | ||
<remap from="/ImageConverterNode/ros1_input_image" to="/image"/> | ||
<remap from="/ImageConverterNode/ros1_output_image" to="/ros1_output_image"/> | ||
<remap from="/ImageConverterNode/ros1_input_bridge_image" to="/ros1_input_bridge_image"/> | ||
<remap from="/ImageConverterNode/ros1_output_bridge_image" to="/ros1_output_bridge_image"/> | ||
<node pkg="nodelet" | ||
type="nodelet" | ||
name="ImageConverterNode" | ||
args="load isaac_ros_nitros_bridge_ros1/ImageConverterNode standalone_nodelet" | ||
output="screen"/> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
|
||
<package format="2"> | ||
<name>isaac_ros_nitros_bridge_ros1</name> | ||
<version>2.0.0</version> | ||
<version>2.1.0</version> | ||
<description>Converter between NITROS bridge messages and ROS1 messages</description> | ||
<maintainer email="[email protected]">Yuankun Zhu</maintainer> | ||
<license>Apache-2.0</license> | ||
|
129 changes: 129 additions & 0 deletions
129
isaac_ros_nitros_bridge_ros2/launch/isaac_ros_image_converter.launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES | ||
# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import os | ||
import subprocess | ||
import time | ||
|
||
import launch | ||
|
||
from launch.actions import DeclareLaunchArgument, OpaqueFunction | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import ComposableNodeContainer | ||
from launch_ros.descriptions import ComposableNode | ||
import launch_testing.actions | ||
|
||
ROS1_INSTALL_PATH = 'install_isolated/setup.bash' | ||
BRIDGE_CONFIG_PATH = 'src/isaac_ros_nitros_bridge/config/nitros_bridge_no_namespace.yaml' | ||
|
||
|
||
def launch_setup(context): | ||
ros1_ws_path = LaunchConfiguration('ros1_ws_path').perform(context) | ||
pub_image_name = LaunchConfiguration('pub_image_name').perform(context) | ||
sub_image_name = LaunchConfiguration('sub_image_name').perform(context) | ||
|
||
roscore_cmd = 'source /opt/ros/noetic/setup.bash && roscore' | ||
subprocess.Popen( | ||
roscore_cmd, | ||
env=os.environ, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
shell=True, | ||
executable='/bin/bash' | ||
) | ||
# Wait one second to ensure roscore is fully launched | ||
time.sleep(1) | ||
|
||
ros1_setup_path = os.path.join(ros1_ws_path, ROS1_INSTALL_PATH) | ||
stop_ros_nodes_cmd = f'source {ros1_setup_path} && rosnode kill -a' | ||
subprocess.run( | ||
stop_ros_nodes_cmd, | ||
env=os.environ, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
shell=True, | ||
executable='/bin/bash' | ||
) | ||
|
||
bridge_config_absolute_path = os.path.join(ros1_ws_path, BRIDGE_CONFIG_PATH) | ||
ros1_converter_cmd = f'source {ros1_setup_path} \ | ||
&& rosparam load {bridge_config_absolute_path} \ | ||
&& roslaunch isaac_ros_nitros_bridge_ros1 isaac_ros_image_converter.launch' | ||
subprocess.Popen( | ||
ros1_converter_cmd, | ||
env=os.environ, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
shell=True, | ||
executable='/bin/bash' | ||
) | ||
|
||
ros1_bridge_cmd = 'ros2 run ros1_bridge parameter_bridge' | ||
subprocess.Popen( | ||
ros1_bridge_cmd, | ||
env=os.environ, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
shell=True | ||
) | ||
|
||
ros2_converter = ComposableNode( | ||
name='ros2_converter', | ||
namespace='', | ||
package='isaac_ros_nitros_bridge_ros2', | ||
plugin='nvidia::isaac_ros::nitros_bridge::ImageConverterNode', | ||
remappings=[ | ||
('ros2_output_bridge_image', 'ros1_input_bridge_image'), | ||
('ros2_output_image', pub_image_name), | ||
('ros2_input_bridge_image', 'ros1_output_bridge_image'), | ||
('ros2_input_image', sub_image_name), | ||
]) | ||
|
||
container = ComposableNodeContainer( | ||
name='ros2_converter_container', | ||
namespace='', | ||
package='rclcpp_components', | ||
executable='component_container_mt', | ||
composable_node_descriptions=[ros2_converter], | ||
output='screen', | ||
arguments=['--ros-args', '--log-level', 'info'] | ||
) | ||
return [container] | ||
|
||
|
||
def generate_launch_description(): | ||
launch_args = [ | ||
DeclareLaunchArgument( | ||
'ros1_ws_path', | ||
description='Path of the ros1 workspace'), | ||
DeclareLaunchArgument( | ||
'pub_image_name', | ||
description='Path of the ros1 workspace'), | ||
DeclareLaunchArgument( | ||
'sub_image_name', | ||
description='Path of the ros1 workspace'), | ||
] | ||
|
||
nodes = launch_args + [OpaqueFunction(function=launch_setup)] | ||
return launch.LaunchDescription( | ||
nodes + [ | ||
# Start tests after a fixed delay for node startup | ||
launch.actions.TimerAction( | ||
period=30.0, | ||
actions=[launch_testing.actions.ReadyToTest()]) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>isaac_ros_nitros_bridge_ros2</name> | ||
<version>2.0.0</version> | ||
<version>2.1.0</version> | ||
<description>Converter between NITROS bridge messages and ROS 2 messages</description> | ||
|
||
<maintainer email="[email protected]">Yuankun Zhu</maintainer> | ||
|
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
|
||
<package format="2"> | ||
<name>isaac_ros_ros1_forward</name> | ||
<version>2.0.0</version> | ||
<version>2.1.0</version> | ||
<description>Forward ROS1 Messages</description> | ||
<maintainer email="[email protected]">Yuankun Zhu</maintainer> | ||
<license>Apache-2.0</license> | ||
|