Skip to content

Tutorial

Braden McDorman edited this page Jan 1, 2021 · 1 revision

astra_ros Tutorial

First, follow the installation and compilation instructions in the Readme.md.

An Example Launch File

It is recommended to start astra_ros via a roslaunch file. Parameters are stored in a .yaml file at a location of your choosing. In this example, we're using the default parameter file supplied with astra_ros.

<launch>
  <node name="astra_ros" pkg="astra_ros" type="node" output="screen">
    <rosparam file="$(find astra_ros)/params/default.yaml" />
  </node>
</launch>

Example Parameter File

For a full listing of parameters and their types, see the Readme.md.

Basic Color and Depth Publisher

devices:
  default:
    color: true
    depth: true

Body Tracking

devices:
  # A device called default will be opened. We could open multiple devices (each must have a unique name)
  default:
    # Open the following URI (this is the default from the Astra SDK)
    uri: "device/default"
    # We want a color stream with the default options
    color: true
    # We want a depth stream with the default options
    depth: true
    body:
      # Publish a MarkerArray of bodies for rviz
      publish_body_markers: true
      # The frame ID of the camera
      frame_id: "quori/head_camera_optical"
      # This must be set to your Orbbec Body Tracking SDK license!
      license: "$LICENSE"

All Features

Note that the Astra SDK only supports two physical streams from the camera (a limitation of OpenNI). As such, the IR stream will be disabled so we can use depth and color.

devices:
  default:
    # Publish the color stream
    color: true
    # Publish the depth stream
    depth: true
    # Publish the body stream
    body:
      license: "$LICENSE"
    # Publish the colorized body stream
    colorized_body: true
    # Publish the masked color stream
    masked_color: true
    # Publish the hand stream
    hand: true
    # Turn on the native point stream (no RGB information)
    point: true

Launching

roslaunch my_package my_launch_file.launch