ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ROS2: URL to camera_info yaml not being recognized

asked 2019-09-20 08:44:16 -0500

updated 2019-09-20 08:50:41 -0500

Running ROS2 dashing Ubuntu 18.04 bionic on x86.

URL to camera info yaml file not being recognized. The url is being loaded via the launch file as a parameter.

I have declared the parameter before trying to use. I have confirmed that the intended url from the launch file is obtained.

See the following repo. Place camera_info.yaml in the /config directory. (example file can be found here.)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-10-10 11:35:34 -0500

mjcarroll gravatar image

Looking at your launch file, you need to either specify the camera_calibration_file with either a file:// prefix or in the package:// format. Without the prefix on the URI, the package will fail to parse it.

Example correction:

# Using file://
config_file = 'file://' + os.path.join(config_dir, 'camera_info.yaml')
# OR using package://
config_file = 'package://ros2_ipcamera/config/camera_info.yaml'
edit flag offensive delete link more


@mjcarroll Thank you for this. I went with using 'file://'. Don't think I would have been able to figure this out without your input.

surfertas gravatar image surfertas  ( 2019-10-11 08:25:15 -0500 )edit

Question Tools



Asked: 2019-09-20 08:44:16 -0500

Seen: 565 times

Last updated: Oct 10 '19