Ask Your Question

[ROS2] roslaunch fails reading yaml file

asked 2019-05-17 09:48:18 -0600

Andreas Ziegler gravatar image

updated 2019-06-17 11:27:38 -0600

Hi everyone

I working with ROS2 Crystal on Ubuntu Bionic. My goal is to add multi camera support to the ros2 realsense node (similar to the solution of the ros1 realsense node). I added a yaml file which is loaded from the launch python script. I also adjusted the node accordingly (You can find the code here and my changes here There seems to be a problem with the loading of the yaml file. It doesn't matter, what parameters I define or not, I always get an error. I even took a yaml file from the ros2 example repository.

When I launch the node with

ros2 launch realsense_ros2_camera

I get the following error message:

[ERROR] [launch.LaunchService]: Caught exception in launch (see debug for traceback): 'utf-8' codec can't decode byte 0xf0 in position 143: invalid continuation byte

I'm glad for any advice.


I now moved to ROS2 dashing and adjusted the code accordingly ( I still have the same problem. When I run the node with

ros2 run realsense_ros2_camera realsense_ros2_camera  __params:=/path/to/config/parameters.yaml

it works as expected and I get the following output:

[INFO] [RealSenseCameraNode]: We are looking for serial number 845112070204.

When I run the same node with the launch file (

ros2 launch realsense_ros2_camera

the parameter is not loaded as the output is:

[realsense_ros2_camera-1] [INFO] [RealSenseCameraNode]: We are looking for serial number 0.

The path to the file is correct (I print it within the python launch file) and there is no error, it just does not load the parameter

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-03 02:51:15 -0600

xhuan28 gravatar image

updated 2019-09-03 02:51:30 -0600

It should be an issue of launch_ros. Refer to the following links for details.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-05-17 09:48:18 -0600

Seen: 735 times

Last updated: Sep 03 '19