From 4922a44251ae1c72e341bea406f6fe0fe8520b3f Mon Sep 17 00:00:00 2001 From: Rooholla-KhorramBakht Date: Fri, 31 May 2024 12:40:53 +0800 Subject: [PATCH] realsense launch and node added are added. --- deploy/launch_files/realsense.launch.py | 4 ++-- docker/Dockerfile.realsense | 10 ++++++++++ docker/scripts/workspace-entrypoint.sh | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/deploy/launch_files/realsense.launch.py b/deploy/launch_files/realsense.launch.py index 95c1990..081a88e 100644 --- a/deploy/launch_files/realsense.launch.py +++ b/deploy/launch_files/realsense.launch.py @@ -18,8 +18,8 @@ def generate_launch_description(): 'enable_color': True, 'enable_depth': True, 'depth_module.emitter_enabled': 1, - 'rgb_camera.profile':'640x480x30', - 'depth_module.profile': '640x480x30', + 'rgb_camera.color_profile':'640x480x30', + 'depth_module.depth_profile': '640x480x30', 'enable_gyro': True, 'enable_accel': True, 'gyro_fps': 400, diff --git a/docker/Dockerfile.realsense b/docker/Dockerfile.realsense index 56cb3f0..54ab421 100644 --- a/docker/Dockerfile.realsense +++ b/docker/Dockerfile.realsense @@ -23,3 +23,13 @@ COPY scripts/hotplug-realsense.sh /opt/realsense/hotplug-realsense.sh # Copy custom udev rules file COPY udev_rules/99-realsense-libusb-custom.rules /etc/udev/rules.d/99-realsense-libusb-custom.rules + +# Clone and compile the realsense ros +RUN mkdir -p /home/realsenes-ws/src && cd /home/realsenes-ws/src && \ + git clone https://github.com/IntelRealSense/realsense-ros.git && \ + cd .. && \ + source /opt/ros/humble/setup.bash && \ + colcon build --symlink-install + +# add the source to the bashrc +RUN echo "source /home/realsenes-ws/install/setup.bash" >> /root/.bashrc diff --git a/docker/scripts/workspace-entrypoint.sh b/docker/scripts/workspace-entrypoint.sh index 261d543..9478355 100755 --- a/docker/scripts/workspace-entrypoint.sh +++ b/docker/scripts/workspace-entrypoint.sh @@ -20,5 +20,5 @@ sudo service udev restart export CMAKE_PREFIX_PATH=/workspace/unitree_ros2/cyclonedds_ws/install/cyclonedds/ python3 -m pip install --upgrade pip cd /workspaces/Go2Py/ && python3 -m pip install -e . - +source /home/realsenes-ws/install/setup.bash $@