This ROS node listens to image messages, rotates them according to the specified angle and scale, and publishes to a new topic. It helps in camera image rotation under real-time conditions.
Navigate to the src
directory of the catkin workspace (e.g., ~/catkin_ws
):
cd ~/catkin_ws/src
Clone the repository into src
directory and rename it to image_rotate
:
git clone https://github.com/zhuxuanya/ros-image-rotate.git image_rotate
Return to catkin workspace root and rebuild:
cd ..
catkin_make
Source the environment to update the workspace:
source devel/setup.bash
List all connected video devices to determine the correct device number (e.g., /dev/video0
):
# sudo apt install v4l-utils
v4l2-ctl --list-devices
Modify the corresponding device parameter in usb_cam
node and run it with the image_rotate
node:
roslaunch image_rotate image_node.launch