Skip to content

mumansky/arena_camera_ros2

 
 

Repository files navigation

arena_camera_ros2

Arena Camera deriver for ROS2 - forked and updated by Mark Umansky

Requirements

Getting Started

  • clone repo or download release

    git clone https://github.com/lucidvisionlabs/arena_camera_ros2.git

  • install ArenaSDK and arena_api

  • build workspace and its dependencies

    source /opt/ros/humble/setup.bash

    cd arena_camera_ros2/ros2_ws

    colcon build --symlink-install # build workspace for dev

  • install the build

    . install/setup.bash

Explore

  • explore nodes

    • arena_camera_node
      • this is the main node. It represent one LUCID Camera.

      • it has two executable start and trigger_image

      • ros arguments

        • serial

          • a string representing the serial of the device to create.
          • if not provided the node, it will represent the first dicovered camera.
        • topic

          • the topic the camera publish images on.
          • default value is /arena_camera_node/images.
          • if passed as a ros argument, it should be preceded with "/"
        • width

          • the width of desired image
          • default value is the one in default user profile.
        • height

          • the height of desired image
          • default value is the one in default user profile.
        • pixelformat

          • the pixel format of the deisred image
          • supported pixelformats are "rgb8", "rgba8", "rgb16", "rgba16", "bgr8", "bgra8", "bgr16", "bgra16", "mono8", "mono16", "bayer_rggb8", "bayer_bggr8", "bayer_gbrg8", "bayer_grbg8", "bayer_rggb16", "bayer_bggr16", "bayer_gbrg16", "bayer_grbg16", "yuv422", "polarized_angles_0d_45d_90d_135d_bayer_rg8"
          • the "polarized_angles_0d_45d_90d_135d_bayer_rg8" format is for polarization cameras like PHX050S1-QC
        • gain

          • a double value represents the gain of the image.
        • exposure_time

          • the time elapsed before the camera sensor creates the image.
          • units is micro seconds.
          • big values might makes the image take too long before it is view/published.
          • if trigger_mode is passed to node them it is recommended to set exposure_time as well so the triggered images do not take longer than expected.
        • trigger_mode

          • puts the device in ready state where it will wait for a trigger_image client to request an image.

          • default value is false. It means the device will be publishing images to the default topic /arena_camera_node/images.

          • values are true and false.

          • when false, images can be viewed

            ros2 run arena_camera_node start --ros-args -p qos_reliability:=reliable -p topic:=image

            ros2 run image_tools showimage

          • when true, image would not be published unless requested/triggered

            ros2 run arena_camera_node start --ros-args -p qos_reliability:=reliable -p topic:=image -p exposure_time:=<proper value> -p trigger_mode:=true

            ros2 run image_tools showimage # no image will be displayed yet

            ros2 run arena_camera_node trigger_image

      • QoS related parameters

        simple example for using arguments together

        ros2 run arena_camera_node start --ros-args -p serial:="904240001" -p topic:=/special_images -p width:=100 -p height:=200 -p pixelformat:=rgb8 -p gain:=10 -p exposure_time:=150 -p trigger_mode:=true

  • explore excutables

    • ros2 pkg executables | grep arena

    • all excutables can be run by using

      ros2 run <pakg name> <executable name>

  • explore actions

    • None
  • explore services

    • trigger_image
      • trigger image form a device that is running in trigger_mode.
      • To run a device in trigger mode ros2 run arena_camera_node start --ros-args -p exposure_time:=<proper value> -p trigger_mode=true
      • To trigger an image run ros2 run arena_camera_node trigger_image

Logging Verbosity

The node uses standard ROS2 logging levels. By default, per-image publish messages are logged at DEBUG level to reduce console noise.

To enable verbose debug logging, set the log level when starting the node:

`ros2 run arena_camera_node start --ros-args --log-level debug`

Or for even more detail:

`ros2 run arena_camera_node start --ros-args --log-level arena_camera_node:=debug`

Available log levels (from most to least verbose): DEBUG, INFO, WARN, ERROR, FATAL

Road map

  • support windows
  • add -h flag to nodes
  • showimage node to view 2D and 3D images
  • launch file
  • camera_info
  • access to nodemaps
  • settings dump/read to/from file
  • support two devices

About

Arena Camera driver for ROS2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 49.9%
  • Python 28.5%
  • CMake 14.6%
  • Shell 7.0%