Skip to content

Miscellaneous ROS Notes

Creating New Packages

Create new_package_name, which depends on std_msgs and rospy

1
2
cd ~/catkin_ws/src
catkin_create_pkg new_package_name std_msgs rospy

ROS Logging

For unknown reasons, normal Python logging is disabled after a call to rospy.init_node(). ROS logging does not work before a call to rospy.init_node(). So use Python logging before and Ros logging after the call to rospy.init_node().

Python Scripts

Top-level ROS Python scripts require a shebang at the top of the file:

1
#!/usr/bin/env python

ROS Uninstall

A ROS uninstall is described here.

Uninstall

1
sudo apt-get remove ros-*

ROS Image Viewer

Images published to topics can be viewed with rqt_image_vew or the rqt Image View plugin.

Install the necessary image transport plugins

1
sudo apt-get install ros-kinetic-image-transport-plugins

ROS - OpenCV Bridge

Details on converting images between ROS and OpenCV are here.

ROS Video Server

Details of the web_video_server package are here.

Install web_video_server with:

1
sudo apt-get install ros-kinetic-web-video-server

Run web_video_server with:

1
rosrun web_video_server web_video_server