Sensors

The Robotont platform includes an Intel RealSense D435i 3D camera, capable of streaming both regular color images and depth data. These camera feeds are available automatically as soon as the robot is turned on.

Setup

  1. Clone the depthimage_to_laserscan package into your workspace and build:

    cd ~/<your_colcon_workspace_name>/src
    git clone https://github.com/ros-perception/depthimage_to_laserscan.git --branch ros2
    colcon build
    
  2. Setup distributed ROS 2 as shown here: Distributed ROS 2

  3. Establish an SSH connection between the robot and the PC as shown here: SSH

Displaying the camera feed

  1. In Terminal, on the PC, start Rviz2:

    rviz2
    
  2. Click on Add and select Camera. In the Camera Image Topic field, select /camera/color/image_raw.

    _images/camera_view.png

Getting distances from objects

The depthimage_to_laserscan node converts the RealSense camera’s depth image into a 2D LaserScan message, which you can use to estimate distances to objects directly in front of the robot.

  1. Launch the depthimage_to_laserscan node on the Robotont or your PC:

    ros2 run depthimage_to_laserscan depthimage_to_laserscan_node
    

    Hint

    Make sure the parameters for the depth image topic and camera info match your camera’s output, e.g.:

    ros2 run depthimage_to_laserscan depthimage_to_laserscan_node \
       --ros-args \
       --remap depth:=/camera/depth/image_raw \
       --remap depth_camera_info:=/camera/color/camera_info
    
  2. Visualize and analyze the LaserScan data:

    Option 1: Rviz2

    • Click on Add and select LaserScan. In the LaserScan Topic field, select /scan

    Gazebo simulation

    _images/laserscan_gazebo.png

    Rviz2 LaserScan visualization

    _images/laserscan_rviz.png

    Option 2: View raw data