Robotics StackExchange | Archived questions

Roatate camera video by 90 degrees

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 imagerotate. I'm doing what it says on the Example Use here http://wiki.ros.org/imagerotate

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 /usbcam/imageraw_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?

Asked by spearer on 2021-10-07 07:21:34 UTC

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

Asked by osilva on 2021-10-07 19:14:32 UTC

Answers