Skip to content
forked from ifm/ifm3d-ros2

ifm pmd-based 3D ToF Camera ROS2 Package

License

Notifications You must be signed in to change notification settings

jim45002/ifm3d-ros2

 
 

Repository files navigation

ifm3d-ros2

ifm3d-ros2 is a wrapper around ifm3d enabling the usage of ifm pmd-based ToF cameras from within ROS 2 software systems.

rviz

Software Compatibility Matrix

ifm3d-ros2 version ifm3d version ROS 2 distribution(s)
0.1.0 0.12.0 Dashing

Building and Installing the Software

Pre-requisites

  1. ROS2
  2. ifm3d

Building from source

ifm3d-ros2 is intended to be built with colcon To that end, the shell commands below assume a single colcon workspace in which ifm3d-ros2 will be built.

Create the colcon workspace:

$ mkdir ~/colcon/ifm3d_ros2/src

Clone the ifm3d-ros2 github repo into this workspace and build it:

$ cd ~/colcon/ifm3d_ros2/src
$ git clone https://github.com/ifm/ifm3d-ros2.git ifm3d_ros2
$ cd ..
$ colcon build
Starting >>> ifm3d_ros2
Finished <<< ifm3d_ros2 [17.6s]

Summary: 1 package finished [17.8s]

Launch the camera node (assuming you are in ~/colcon/ifm3d_ros2):

$ . install/setup.bash
$ ros2 launch ifm3d_ros2 camera_managed.launch.py

In a new shell, to visualize the data from the camera in rviz (assuming you are in ~/colcon/ifm3d_ros2):

$ . install/setup.bash
$ ros2 launch ifm3d_ros2 rviz.launch.py

ROS Interface

Parameters

Name Data Type Default Value Description
~/frame_latency_thresh float 1.0 Time (seconds) used to determine that timestamps from the camera cannot be trusted. When this threshold is exceeded, when compared to system time, we use the reception time of the frame and not the capture time of the frame.
~/ip string 192.168.0.69 The ip address of the camera.
~/password string The password required to establish an edit session with the camera.
~/schema_mask uint16 0xf The schema mask to apply to the active session with the frame grabber. This determines which images are available for publication from the camera. More about schemas can be gleaned from the ifm3d project.
~/timeout_millis int 500 The number of milliseconds to wait for the framegrabber to return new frame data before declaring a "timeout" and to stop blocking on new data.
~/timeout_tolerance_secs float 5.0 The wall time to wait with no new data from the camera before trying to establish a new connection to the camera. This helps to provide robustness against camera cables becoming unplugged or other in-field pathologies which would cause the connection between the ROS node and the camera to be broken.
~/sync_clocks bool false Attempt to sync the camera clock to the system clock at start-up. The side-effect is that timestamps on the image should reflect the capture time as opposed to the receipt time. Please note: resolution of this synch is only granular to 1 second. If fine-grained image acquisition times are needed, consider using the on-camera NTP server (available on select camera models).
~/xmlrpc_port uint16 80 The TCP port the camera's xmlrpc server is listening on for requests.

Published Topics

Name Data Type Description
amplitude sensor_msgs/Image The normalized amplitude image
cloud sensor_msgs/PointCloud2 The point cloud data
confidence sensor_msgs/Image The confidence image
distance sensor_msgs/Image The radial distance image
raw_amplitude sensor_msgs/Image The raw amplitude image
unit_vectors sensor_msgs/Image The rotated unit vectors
xyz_image sensor_msgs/Image A 3-channel image encoding of the point cloud. Each of the three image channels respesent a spatial data plane encoding the x, y, z Cartesian values respectively.

Subscribed Topics

None.

Advertised Services

Currently none. However, we are actively working to round out the features of our ROS2 interface to be, at least, equivalent to that of our ROS1 node. Check back soon for things like Dump, Config, etc. In the interim, to configure imager parameters, you should use the underlying (non-ROS) utilities available in ifm3d.

Additional Documentation

Coming soon.

TODO

We are currently working on rounding out the feature set of our ROS2 interface. Our current objectives are to get the feature set to an equivalent level to that of our ROS1 interface and to tune the ROS2/DDS performance to optimize the usage of our cameras from within ROS2 system. Thanks for your patience as we continue to ensure our ROS2 interface is feature-rich, robust, and performant. Your feedback on our issue tracker is greatly appreciated.

Please see the file called TODO for more information of what we are currently working on.

LICENSE

Please see the file called LICENSE.

About

ifm pmd-based 3D ToF Camera ROS2 Package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 70.7%
  • Python 25.3%
  • CMake 3.7%
  • Shell 0.3%