This ROS package provides support for Voyant sensors targeting the ROS2 Humble distribution. Configure the sensor (client) address using the config/sensor_params.yaml file. This package only supports ROS2 Humble and Ubuntu 22.04 for now, and it is not guaranteed to work with other ROS2 distributions or operating systems. Support for other distributions and operating systems will be added in the future.
For Docker instructions on other ROS2 distributions and RMW implementations, refer to the Docker Instructions section.
- Meadowlark: Specsheet (specsheet coming soon...)
Follow the official ROS2 documentation to install ROS2 Humble on your system.
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone git@github.com:Voyant-Photonics/voyant-ros.git- For Foxglove visualization, install Foxglove Studio from the official website
- Alternatively you can also visualize the pointcloud over the Web using the Foxglove Web. Simply open the Foxglove Web and connect to the default Foxglove websocket server at
ws://localhost:8765 - Install the ROS2-Foxglove bridge:
sudo apt install ros-humble-foxglove-*
sudo apt install ros-humble-pcl-ros ros-humble-rviz2Note You can also install it using the rosdep command
rosdep install --from-paths src --ignore-src -r -yThe pointcloud can also be visualized using the RViz, set
use_rvizlaunch argumenttrueto visualize pointcloud in RViz.
This repository also provides a Dockerfile to build a Docker image with the ROS2 Humble distribution and the Voyant ROS package. To build the Docker image, run the following command from the repo root:
docker build --build-arg "VIZ_BRIDGE=true" -t voyant_ros2_container .The Docker image has been tested on Ubuntu 22.04 and ROS2 distributions like Humble, Iron, Rolling and Jazzy. RMW implementations like FastRTPS and CycloneDDS have been tested with the Docker image.
docker build --build-arg "VIZ_BRIDGE=true" \
--build-arg "ROS_DISTRO=rolling" \ # humble, iron, rolling, jazzy
--build-arg "RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" \ # rmw_fastrtps_cpp, rmw_cyclonedds_cpp
-t voyant_ros2_container .Note The
VIZ_BRIDGEargument is optional and can be set totrueto install the Foxglove bridge for visualization. The default value isfalse. If the argument is set totrue, the Foxglove bridge will be installed. Follow the instructions from the Visualization Guide to configure Foxglove for pointcloud visualization in separate terminal or in a web browser.
To run the Docker container, execute the following command:
docker run -it --network=host voyant_ros2_containerFollow the native installation guide from the official Voyant SDK Documentation.
source /opt/ros/humble/setup.bash # source ROS2 Humble
colcon build --symlink-install --packages-select voyant_rossource install/setup.bashros2 launch voyant_ros sensor_launch.pyor with RViz visualization
ros2 launch voyant_ros sensor_launch.py use_rviz:=true # for rvizThe configurations for ROS2 bag can be found in config/sensor_params.yaml file. There are two ways you can run use the conversion tool.
If you have already build the voyant_ros package using colcon, use the binary files as below.
cd ~/ros2_ws/build/voyant-ros
./bin/voyant_bin_to_mcap ros2_ws/src/voyant-ros/config/sensor_params.yaml # path to your params yaml filecd ~/ros2_ws/src/voyant-ros
mkdir -p build
cd build
cmake ..
make
./bin/voyant_bin_to_mcap ros2_ws/src/voyant-ros/config/sensor_params.yaml # path to your params yaml fileYou can only convert MCAP files with the correct data.
At time of writing, that means you will need to record the
/device_metadatafield and to usepoint_format: 2 # MDL_EXTENDEDwhen recording.
Build the tool:
# source ROS2 Humble
source /opt/ros/humble/setup.bash
# build with colcon
colcon build --symlink-install --packages-select voyant_ros
# Source the workspace (required for compiled VoyantDeviceMetadata.msg)
source install/setup.bashEdit the yaml config file to pass the correct file paths.
Run the tool:
./build/voyant_ros/bin/voyant_mcap_to_bin config/mcap_to_bin_params.yamlThe launch command will start the driver and publish pointcloud data on the /point_cloud topic. It will also open the Foxglove GUI for visualization.
- Click on
Open connection...in the Foxglove GUI on the left panel. - Connect Foxglove to the default Foxglove websocket server at
ws://localhost:8765 - In the top right corner of the Foxglove GUI title bar, click on the
Layoutbutton and import the configuration file fromconfig/voyant_ros_foxglove_cfg.json
This will load a layout with pointcloud data visualization, offering three different color maps. For more information on the colormap options, refer to the Foxglove Colormap Documentation.
The Foxglove configuration uses a template system to keep user scripts version-controlled as separate .ts files.
Files:
config/foxglove_user_scripts/*.ts- Edit these scripts directlyconfig/voyant_foxglove_cfg.template.json- Edit layout, panels, and global variables hereconfig/voyant_foxglove_cfg.json(Auto-generated, do not edit) - The layout to import into Foxglove After modifying any user script or the template, regenerate the config:
python3 config/build_foxglove_config.py \
--template config/voyant_foxglove_cfg.template.json \
--scripts-dir config/foxglove_user_scripts \
--output config/voyant_foxglove_cfg.jsonAnd clean up the formatting:
pre-commit run --all-files