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

camera_info_manager with ROS2

asked 2023-01-13 00:18:09 -0500

kidargueta gravatar image

updated 2023-01-13 00:18:55 -0500

I am porting Python code from ROS 1 to ROS 2. The ROS 1 code made use of the 'camera_info_manager' and I made it available to python by installing the camera_info_manager_py package. When running the script using ROS 2, which contains this line

from camera_info_manager import CameraInfoManager

I get the obvious

ModuleNotFoundError: No module named 'camera_info_manager'

error and there does not seem to be a camera_info_manager_py package for ROS 2. I haven't been able to find an alternative. Any suggestions?

Thanks,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-01-23 07:23:04 -0500

AibohphobiA gravatar image

Hi there, I'm not sure about Python API but I faced the same issue with C++. On ROS1, Camera_info_manager was a seperate package. it has been integrated in to ROS2 now, so in order to use it I had to change my include from:

#include <camera_info_manager/camera_info_manager.h>

to:

#include <sensor_msgs/msg/camera_info.hpp>

I am assuming the same logic works for the Python API, So I would try using sensor_msgs.msg.camera_info

See this following thread which may help.

Hope this helps.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-01-13 00:18:09 -0500

Seen: 810 times

Last updated: Jan 23 '23