This page is describing the upcoming ROS2 version of the MRS UAV System (however, it may be still outdated). If you are looking for ROS1 version of the docs, follow to https://ctu-mrs.github.io/docs/1.5.0/introduction/.
Bluefox2
This a refactored version of the old Bluefox2 camera driver for ROS2 Jazzy. Original ROS version can be found here: https://github.com/ctu-mrs/bluefox2
Installation
The driver is part of the full installation of the mrs system (ros-jazzy-mrs-uav-system-full
).
If missing, install it by running the following command:
sudo apt install ros-jazzy-bluefox2
Startup
First, you have to define environment variable 'UAV_NAME'. For example, you can do it by:
export UAV_NAME=uav1
or you can add it to your .bashrc to make it more permanent:
echo "export UAV_NAME=uav1" >> ~/.bashrc
If you do not have this environment variable set, you will see this error message:
Caught exception in launch (see debug for traceback): environment variable 'UAV_NAME' does not exist
Now you can launch the camera node. This launch command should find the camera automatically, so you don't have to specify camera serial number manually.
ros2 launch bluefox2 single.launch.py
If camera discovery went fine, you should see something like this:
Found Bluefox2 devices: [25003671 12345678... ]
The first found device is used. If there are some problems, you can also list cameras manually with more info printed:
ros2 run bluefox2 bluefox2_list_cameras_human_readable
If you have more cameras connected and you don't want the driver to use the first camera (or when discovery fails for some reason), you can to specify camera serial number manually:
ros2 launch bluefox2 single.launch.py device:=12345678
or you can set the environment variable 'BLUEFOX' to the value of serial number:
export BLUEFOX=12345678
The driver will pick it up automatically.
Custom configs
You can provide a custom config to the launch file as
ros2 launch bluefox2 single.launch.py custom_config:=custom_config.yaml
The custom configs allows you to define your own parameters and also to remap the outgoing topics:
fps: 30 # limit the camera framerate
remappings: # remap topics in case your software searches for specific topic
'~/depth/image_rect_raw': ~/depth/image_raw
'~/depth/image_rect_raw/compressed': ~/depth/image_raw/compressed
'~/depth/image_rect_raw/compressedDepth': ~/depth/image_raw/compressedDepth
Note: You cannot specify namespace in your custom config because this node is running as a composable node.
More info
Check the following sources