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

  1. Set up your development environment by following the instructions in getting started.

  2. 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
    
  3. (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

  1. Launch the Docker container using the run_dev.sh script:

    cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
      ./scripts/run_dev.sh
    
  2. Install the prebuilt Debian package:

    sudo apt-get update
    
    sudo apt-get install -y ros-humble-isaac-ros-data-recorder
    

Run Launch File

  1. Run the RealSense node:

    ros2 launch realsense2_camera rs_launch.py
    
  2. 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 than look_back_window, then max_bag_duration will be reduced to look_back_window.

  1. 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.

  2. 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.