Roatate camera video by 90 degrees

asked 2021-10-07 07:21:34 -0600

spearer gravatar image

Hello

I was able to setup a camera on a different machine from the one which runs roscore.

The camera machine is Ubuntu 16.04 with ROS Kinetic

The roscore machine is Ubuntu 20.04 with ROS Noetic

I'm able to image_view like this

rosrun image_view image_view image:=/usb_cam/image_raw

It's works great.

However the camera is installed with a rotation. I need to do a simple 90 degrees image rotation (180 degrees would be upside down).

I found only image_rotate. I'm doing what it says on the Example Use here http://wiki.ros.org/image_rotate

rosrun image_rotate image_rotate image:=usb_cam/image_raw rotated/image:=usb_cam/image_raw_rotated __name:=image_rotater

I can see the new rostopic /usb_cam/image_raw_rotated when I try to do

rosrun image_view image_view image:=/usb_cam/image_raw_rotated

the image freezes and I get this error in the image_rotate:

[ERROR] [1633607733.582929110]: Transform error: "base_link" passed to lookupTransform argument target_frame does not exist.

What am I doing wrong?

edit retag flag offensive close merge delete

Comments

There is a similar question that may help you understand why is happening: #q240427

Why don’t you rotate the image after you receive separately? And perhaps you don’t have to rotate every single frame as this is expensive operation

osilva gravatar image osilva  ( 2021-10-07 19:14:32 -0600 )edit