Skip to content

ROS2 data recorder for Unitree Go2 and TurtleBot4 robots. Captures synchronized video, odometry, and LIDAR scan data to timestamped files.

Notifications You must be signed in to change notification settings

akifbayram/ros2_recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ros2_recorder

ros2_recorder is a script designed to work with the go2_ros2_sdk for the Unitree Go2 robot and the TurtleBot4. It records video streams from the robot's camera, along with odometry and LIDAR scan data, saving them into organized and timestamped files. Optimized for single-robot setups, it can also be configured via parameters for namespaced robots.

image

Tested Prerequisites

  • Operating System: Ubuntu 22.04
  • ROS2 Distribution: Humble
  • Robot SDKs:
  • Python Dependencies:
    • OpenCV (opencv-python)
    • cv_bridge

Installation

Clone the Repository

git clone https://github.com/akifbayram/ros2_recorder.git
cd ros2_recorder

Usage

  1. Ensure go2_ros2_sdk or turtlebot4 is Running

    Make sure the appropriate SDK is active and publishing the necessary topics for your robot.

  2. Run the Script

    python ros2_recorder.py
  3. Configure Parameters (Optional)

    You can customize the script's behavior using command-line arguments.

    Examples:

    • Default Run for Go2:

      python ros2_recorder.py
    • Run for TurtleBot4 with Namespace /robot1:

      python ros2_recorder.py --robot_type turtlebot4 --namespace /robot1
    • Run with Custom Topics:

      python ros2_recorder.py \
        --robot_type turtlebot4 \
        --namespace /robot1 \
        --image_topic /custom_camera/image \
        --odom_topic /custom_odom \
        --scan_topic /custom_scan
    • Run with All Parameters Specified:

      python ros2_recorder.py \
        --output_directory "/home/user/ros_output" \
        --robot_type go2 \
        --namespace /my_robot \
        --image_topic /my_robot/camera/image \
        --odom_topic /my_robot/odom \
        --scan_topic /my_robot/scan \
        --video_filename my_video.mp4 \
        --odom_filename my_odometry.csv \
        --scan_filename my_scan.csv \
        --video_fps 30.0 \
        --video_codec XVID \
        --display_video \
        --check_interval 10.0 \
        --no_data_timeout 10.0
  4. Stop Recording

    Press Ctrl+C in the terminal to stop recording.

Acknowledgments

This project utilizes the excellent work from the following repositories:

About

ROS2 data recorder for Unitree Go2 and TurtleBot4 robots. Captures synchronized video, odometry, and LIDAR scan data to timestamped files.

Topics

Resources

Stars

Watchers

Forks

Languages