isaac ros workspace added
This commit is contained in:
parent
df990bfb0a
commit
4ba7ff0970
|
@ -172,4 +172,5 @@ deploy/nav2_ws/install
|
|||
deploy/nav2_ws/log
|
||||
|
||||
_isaac_sim
|
||||
.vscode
|
||||
.vscode
|
||||
deploy/sgiaun-umut
|
|
@ -30,10 +30,10 @@ cd .. && colcon build --packages-select cyclonedds && source /opt/ros/humble/set
|
|||
COPY deploy/dock_ws/src /dock_ws/src
|
||||
RUN cd /dock_ws && source /opt/ros/humble/setup.bash && colcon build --symlink-install
|
||||
|
||||
# Compile the C++ hypervisor bridge
|
||||
COPY deploy/dds_bridge /dds_bridge
|
||||
WORKDIR /dds_bridge
|
||||
RUN ./install.sh && mkdir build && cd build && cmake .. && make
|
||||
# # Compile the C++ hypervisor bridge
|
||||
# COPY deploy/dds_bridge /dds_bridge
|
||||
# WORKDIR /dds_bridge
|
||||
# RUN ./install.sh && mkdir build && cd build && cmake .. && make
|
||||
|
||||
# Copy the script to start the nodes
|
||||
COPY deploy/scripts /root/scripts
|
||||
|
|
|
@ -30,9 +30,9 @@ COPY deploy/robot_ws/src /robot_ws/src
|
|||
RUN cd /robot_ws && source /opt/ros/humble/setup.bash && colcon build --symlink-install
|
||||
|
||||
# Compile the C++ hypervisor bridge
|
||||
COPY deploy/dds_bridge /dds_bridge
|
||||
WORKDIR /dds_bridge
|
||||
RUN ./install.sh && mkdir build && cd build && cmake .. && make
|
||||
#COPY deploy/dds_bridge /dds_bridge
|
||||
#WORKDIR /dds_bridge
|
||||
#RUN ./install.sh && mkdir build && cd build && cmake .. && make
|
||||
|
||||
# Copy the script to start the nodes
|
||||
COPY deploy/scripts /root/scripts
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
CONFIG_IMAGE_KEY="ros2_humble.realsense.go2py"
|
||||
CONFIG_DOCKER_SEARCH_DIRS=(../../../docker)
|
|
@ -0,0 +1,6 @@
|
|||
ARG BASE_IMAGE
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
RUN apt update && sudo apt-get install -y ros-humble-isaac-ros-visual-slam \
|
||||
ros-humble-isaac-ros-h264-decoder \
|
||||
ros-humble-isaac-ros-h264-encoder
|
|
@ -0,0 +1,112 @@
|
|||
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
|
||||
# Copyright (c) 2022-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
|
||||
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
|
||||
import launch
|
||||
from launch.actions import ExecuteProcess
|
||||
from launch_ros.actions import ComposableNodeContainer
|
||||
from launch_ros.descriptions import ComposableNode
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
# RealSense
|
||||
realsense_config_file_path = os.path.join(
|
||||
get_package_share_directory('isaac_ros_h264_encoder'),
|
||||
'config', 'realsense.yaml'
|
||||
)
|
||||
|
||||
realsense_node = ComposableNode(
|
||||
package='realsense2_camera',
|
||||
plugin='realsense2_camera::RealSenseNodeFactory',
|
||||
parameters=[realsense_config_file_path],
|
||||
remappings=[
|
||||
('infra1/image_rect_raw', 'left/image_rect_raw_mono'),
|
||||
('infra2/image_rect_raw', 'right/image_rect_raw_mono'),
|
||||
('infra1/camera_info', 'left/camerainfo'),
|
||||
('infra2/camera_info', 'right/camerainfo')
|
||||
]
|
||||
)
|
||||
|
||||
left_format_converter_node = ComposableNode(
|
||||
package='isaac_ros_image_proc',
|
||||
plugin='nvidia::isaac_ros::image_proc::ImageFormatConverterNode',
|
||||
name='image_format_node_left',
|
||||
parameters=[{
|
||||
'encoding_desired': 'rgb8',
|
||||
}],
|
||||
remappings=[
|
||||
('image_raw', 'left/image_rect_raw_mono'),
|
||||
('image', 'left/image_rect_raw')]
|
||||
)
|
||||
|
||||
right_format_converter_node = ComposableNode(
|
||||
package='isaac_ros_image_proc',
|
||||
plugin='nvidia::isaac_ros::image_proc::ImageFormatConverterNode',
|
||||
name='image_format_node_right',
|
||||
parameters=[{
|
||||
'encoding_desired': 'rgb8',
|
||||
}],
|
||||
remappings=[
|
||||
('image_raw', 'right/image_rect_raw_mono'),
|
||||
('image', 'right/image_rect_raw')]
|
||||
)
|
||||
|
||||
left_encoder_node = ComposableNode(
|
||||
package='isaac_ros_h264_encoder',
|
||||
plugin='nvidia::isaac_ros::h264_encoder::EncoderNode',
|
||||
name='left_encoder_node',
|
||||
parameters=[{
|
||||
'input_width': 640,
|
||||
'input_height': 480,
|
||||
}],
|
||||
remappings=[
|
||||
('image_raw', 'left/image_rect_raw'),
|
||||
('image_compressed', 'left/image_compressed')]
|
||||
)
|
||||
|
||||
right_encoder_node = ComposableNode(
|
||||
package='isaac_ros_h264_encoder',
|
||||
plugin='nvidia::isaac_ros::h264_encoder::EncoderNode',
|
||||
name='right_encoder_node',
|
||||
parameters=[{
|
||||
'input_width': 640,
|
||||
'input_height': 480,
|
||||
}],
|
||||
remappings=[
|
||||
('image_raw', 'right/image_rect_raw'),
|
||||
('image_compressed', 'right/image_compressed')]
|
||||
)
|
||||
|
||||
container = ComposableNodeContainer(
|
||||
name='encoder_container',
|
||||
namespace='encoder',
|
||||
package='rclcpp_components',
|
||||
executable='component_container_mt',
|
||||
composable_node_descriptions=[realsense_node, left_format_converter_node,
|
||||
right_format_converter_node,
|
||||
left_encoder_node, right_encoder_node],
|
||||
output='screen'
|
||||
)
|
||||
|
||||
rosbag_record = ExecuteProcess(
|
||||
cmd=['ros2', 'bag', 'record', '/left/camerainfo', '/right/camerainfo',
|
||||
'/left/image_compressed', '/right/image_compressed'],
|
||||
output='screen')
|
||||
|
||||
return (launch.LaunchDescription([rosbag_record, container]))
|
|
@ -0,0 +1,30 @@
|
|||
from launch import LaunchDescription
|
||||
from launch.actions import IncludeLaunchDescription
|
||||
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||
from launch.substitutions import ThisLaunchFileDir
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
return LaunchDescription([
|
||||
Node(
|
||||
name='go2_cam',
|
||||
namespace='go2/cam',
|
||||
package='realsense2_camera',
|
||||
executable='realsense2_camera_node',
|
||||
parameters=[{
|
||||
'enable_infra1': True,
|
||||
'enable_infra2': True,
|
||||
'enable_color': False,
|
||||
'enable_depth': False,
|
||||
'depth_module.emitter_enabled': 0,
|
||||
'depth_module.profile': '640x480x60',
|
||||
'enable_gyro': True,
|
||||
'enable_accel': True,
|
||||
'gyro_fps': 400,
|
||||
'accel_fps': 200,
|
||||
'unite_imu_method': 2,
|
||||
# 'tf_publish_rate': 0.0
|
||||
}]
|
||||
)
|
||||
])
|
|
@ -0,0 +1,2 @@
|
|||
cp .isaac_ros_common-config src/isaac_ros_common/scripts/
|
||||
./src/isaac_ros_common/scripts/run_dev.sh $(pwd)
|
Loading…
Reference in New Issue