Tutorial: Running Event Recorder with RealSense
Overview
This tutorial will demonstrate how to run the event recorder with a RealSense camera.
Quickstart
Set Up Development Environment
Set up your development environment by following the instructions in getting started.
Clone
isaac_ros_common
under${ISAAC_ROS_WS}/src
.cd ${ISAAC_ROS_WS}/src && \ git clone -b release-3.2 https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git isaac_ros_common
(Optional) Install dependencies for any sensors you want to use by following the sensor-specific guides.
Note
We strongly recommend installing all sensor dependencies before starting any quickstarts. Some sensor dependencies require restarting the Isaac ROS Dev container during installation, which will interrupt the quickstart process.
Set Up RealSense
Follow Isaac ROS RealSense Setup to set up the RealSense camera.
Build isaac_ros_data_recorder
Launch the Docker container using the
run_dev.sh
script:cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \ ./scripts/run_dev.sh
Install the prebuilt Debian package:
sudo apt-get update
sudo apt-get install -y ros-humble-isaac-ros-data-recorder
Clone this repository under
${ISAAC_ROS_WS}/src
:cd ${ISAAC_ROS_WS}/src && \ git clone -b release-3.2 https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nova.git isaac_ros_nova
Launch the Docker container using the
run_dev.sh
script:cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \ ./scripts/run_dev.sh
Use
rosdep
to install the package’s dependencies:sudo apt-get update
rosdep update && rosdep install --from-paths ${ISAAC_ROS_WS}/src/isaac_ros_nova/isaac_ros_data_recorder --ignore-src -y
Build the package from source:
cd ${ISAAC_ROS_WS} && \ colcon build --packages-up-to isaac_ros_data_recorder --base-paths ${ISAAC_ROS_WS}/src/isaac_ros_nova/isaac_ros_data_recorder
Source the ROS workspace:
Note
Make sure to repeat this step in every terminal created inside the Docker container.
Since this package was built from source, the enclosing workspace must be sourced for ROS to be able to find the package’s contents.
source install/setup.bash
Run Launch File
Run the RealSense node:
ros2 launch realsense2_camera rs_launch.py
In a separate terminal, run the event recorder node:
ros2 launch isaac_ros_data_recorder data_recorder.launch.py event_recorder:=True \ topics:="[ '/rosout', '/diagnostics', '/tf', '/tf_static', '/camera/color/image_raw/compressed', '/camera/color/camera_info', '/camera/color/metadata', '/camera/imu' ]"Note
By default, the event recorder will save 60 seconds of RealSense data in each MCAP file. This can be configured via the
max_bag_duration
launch argument.Warning
If
max_bag_duration
is greater thanlook_back_window
, thenmax_bag_duration
will be reduced tolook_back_window
.
In a separate terminal, use the
event_start
service to signal the start of an event:ros2 service call event_start isaac_ros_data_recorder/srv/Event
Note
By default, the event recorder will save 60 seconds of RealSense data before the start of the event. This can be configured via the
look_back_window
launch argument.In the same terminal as Step 3, use the
event_end
service to signal the end of an event:ros2 service call event_end isaac_ros_data_recorder/srv/Event
Note
By default, the event recorder will save 60 seconds of RealSense data after the end of the event. This can be configured via the
look_ahead_window
launch argument.