[ROS2] roslaunch fails reading yaml file
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 https://github.com/AndreasAZiegler/ro... and my changes here https://github.com/AndreasAZiegler/ro...). 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 ros2_intel_realsense.launch.py
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.
[Update]
I now moved to ROS2 dashing and adjusted the code accordingly (https://github.com/AndreasAZiegler/ro...). 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 (https://github.com/AndreasAZiegler/ro...)
ros2 launch realsense_ros2_camera ros2_intel_realsense.launch.py
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