No, not that ROS. This is about robots.
Resources
-
A balanced and excellent article about why one might have better ways to make a robot than to use ROS.
-
A not so balanced rant about ROS that I swear I totally did not write!
-
A good explanation of how filesystems in ROS are organized.
-
ROS courses?
-
MachineKit looks interesting for lower level control and coordination of robotic components. This was forked from LinuxCNC which may have performance demands that will challenge Ros.
-
I think ROS2’s messaging system is built with OpenDDS. They had also considered ZeroMQ.
-
I’m not sure that ROS uses this, but if you want the actual robot part of ROS without ROS, check out The Orocos Project which provides Open Robot Control Software.
Installation
Here is a guide for Debian 10 (buster).
This Tutorial was claimed to work for Ubuntu16.04. http://wiki.ros.org/ROS/Tutorials
Ubuntu
In 2017 it is wise to use 16.04. I have complete notes on creating a USB flash drive just to run ROS. Once you have a standard Ubuntu 16.04 installation, follow these official instructions for installation. Note that the install of ROS adds about 3GB to the system.
Raspberry Pi
Apparently it is possible to install Ros on Raspberry Pi. With Pi, why mess around configuring anything? Just get someone else’s working image. Here’s one that might work out.
The Brave New World Of Debian 9 Stretch And 10 Buster
On old Debian (Jessie 8) it’s the same story as other distros (Ubuntu). Debian 9, however, was a big improvement. The weird thing that was hard for me to understand is that with Ubuntu and old Debian, you don’t run ROS on an Ubuntu or Debian system. You run ROS on a ROS system. On new Debian 9, everything that’s needed for ROS is actually in the real Debian system (not /opt with clever env tricks). The new Debian (since 9) method is conceptually equivalent to Lunar or Kinetic (the new Debian packages can’t even mention that system). It’s a very clean design which surely must reduce redundancy. But as easy as it is to install and have ready, there’s still the considerable task of arranging for all the specific project dependencies.
For Debian 10 (buster) it seems that to install is to simply do this.
$ apt install ros-desktop-full
If you’re really wanting everything consider the dev packages too.
$ apt install ros-desktop-full-dev
This page on the ROS wiki sort of explains the muddled situation and cautions that doing things the clean Debian way will cause problems. Of course having a giant package management fiasco outside of the distro is already a pretty serious problem.
In 2020 it looks like this way is really the way to go. While Debian packages are still the clean way to install, it may not be the best way if you need something complicated. Still if you can make Debian managed packages work, I think it’s the right thing to do.
So what if apt can not produce all the whizbang features you need, e.g. the point cloud library. Despite 85% of point cloud library users using "Debian and friends" it still might be required to install ROS the ROS way and not the Debian way. Unfortunately, the installation instructions say: ROS Melodic ONLY supports Stretch (Debian 9) for debian packages. While that seems silly given that Debian 10 is not at all new (released Jul 2019), it does seem to be true - that wiki’s installation technique and listed repos do not work. No answer on what to do about this.
What Did I Just Install?
On my system, ROS will install no less than 339 additional packages, including things like graphviz , OpenMPI, 204 libs, 71 Python modules, and a Ruby ecosystem. That adds about 1GB of disk usage. The dev system will add a whopping 648 additional packages and another 1.3G of disk usage!
It does look like it gets the main ROS stuff though.
-
ros-base - Python Robot OS base metapackage
-
ros-core - Robot OS core metapackage
-
ros-desktop - Robot OS desktop metapackage
-
ros-desktop-full - Robot OS desktop-full metapackage
-
ros-perception - Python Robot OS perception metapackage
-
ros-robot - Python Robot OS robot metapackage
-
ros-simulators - Python Robot OS simulators metapackage
-
ros-viz - Python Robot OS viz metapackage
Full List Of ROS Packages
Because things can get complicated and there are so many ROS packages, I’ll list the full set of ROS packages that I know about for reference.
-
camera-calibration-parsers-tools - Robot OS camera_calibration_parsers_tools package
-
catkin - Low-level build system macros and infrastructure for Robot OS
-
cl-actionlib - Robot OS actionlib library - LISP interface
-
cl-actionlib-msgs - Messages relating to Robot OS actionlib, LISP interface
-
cl-bond - Messages related to Robot OS bond_core - LISP
-
cl-diagnostic-msgs - Messages relating to Robot OS diagnostic, LISP interface
-
cl-dynamic-reconfigure - Robot OS dynamic-reconfigure library - LISP bindings
-
cl-geometry-msgs - Messages relating to Robot OS geometry, LISP interface
-
cl-nav-msgs - Messages relating to Robot OS nav, LISP interface
-
cl-nodelet - Robot OS nodelet library - service files - LISP
-
cl-opencv-apps - opencv_apps Robot OS package - LISP bindings
-
cl-pcl-msgs - LISP code for PCL-related Robot OS Messages
-
cl-polled-camera - Robot OS polled_camera package - LISP
-
cl-rosgraph-msgs - Messages relating to the Robot OS Computation Graph, LISP bindings
-
cl-sensor-msgs - Messages relating to Robot OS sensor, LISP interface
-
cl-shape-msgs - Messages relating to Robot OS shape, LISP interface
-
cl-std-msgs - LISP interface for Standard Robot OS Messages
-
cl-stereo-msgs - Messages relating to Robot OS stereo, LISP interface
-
cl-tf - Robot OS tf transform library — LISP interface
-
cl-tf2-msgs - Robot OS tf2 transform library messages - LISP
-
cl-tf2-srvs - Robot OS tf2 transform library services - LISP
-
cl-topic-tools - LISP library for working with Robot OS topics
-
cl-trajectory-msgs - Messages relating to Robot OS trajectory, LISP interface
-
cl-visualization-msgs - Messages relating to Robot OS visualization, LISP interface
-
image-transport-tools - Robot OS image_transport package tools
-
libactionlib-dev - Robot OS actionlib library - development files
-
libactionlib-msgs-dev - Messages relating to the Robot OS actionlib, C/C++ interface
-
libactionlib0d - Robot OS actionlib library
-
libangles-dev - Robot OS set of simple math utilities to work with angles
-
libbond-dev - Messages related to Robot OS bond_core - development
-
libbondcpp-dev - Development files for Robot OS bondcpp library
-
libbondcpp1d - Robot OS bondcpp library
-
libcamera-calibration-parsers-dev - Robot OS camera_calibration_parsers package - development
-
libcamera-calibration-parsers0d - Robot OS camera_calibration_parsers package
-
libcamera-info-manager-dev - Robot OS camera_info_manager package - development
-
libcamera-info-manager0d - Robot OS camera_info_manager package
-
libclass-loader-dev - development files for Robot OS class_loader library
-
libcpp-common0d - Robot OS utility library
-
libcv-bridge-dev - cv_bridge Robot OS package - development
-
libcv-bridge1d - cv_bridge Robot OS package
-
libdiagnostic-msgs-dev - Messages relating to Robot OS diagnostic, C/C++ interface
-
libdynamic-reconfigure-config-init-mutex-dev - Robot OS dynamic-reconfigure library - development files
-
libdynamic-reconfigure-config-init-mutex0d - Robot OS dynamic-reconfigure library
-
libeigen-stl-containers-dev - Robot OS wrapper for eigen
-
libgeometric-shapes-dev - Robot OS geometric_shapes package - development files
-
libgeometric-shapes3d - Robot OS geometric_shapes package
-
libgeometry-msgs-dev - Messages relating to Robot OS geometry, C/C++ interface
-
libimage-geometry-dev - image_geometry Robot OS package - development
-
libimage-geometry0d - image_geometry Robot OS package - runtime
-
libimage-transport-dev - Robot OS image_transport package - development
-
libimage-transport0d - Robot OS image_transport package
-
libinteractive-markers-dev - Robot OS interactive_markers package - development files
-
libinteractive-markers1d - Robot OS interactive_markers package
-
libjoint-state-listener0d - Robot OS robot_state_publisher listener library
-
liblaser-geometry-dev - Robot OS laser geometry package - development files
-
liblaser-geometry0d - Robot OS laser geometry package
-
libmessage-filters-dev - Development files for Robot OS message-filters
-
libmessage-filters1d - Library for Robot OS message-filters
-
libnav-msgs-dev - Messages relating to Robot OS nav, C/C++ interface
-
libnodelet-dev - Robot OS nodelet library - service header files
-
libnodelet-topic-tools-dev - Robot OS nodelet_topic_tools library - development files
-
libnodeletlib-dev - Robot OS nodelet library - development
-
libnodeletlib-tools - Robot OS nodelet library
-
libnodeletlib1d - Robot OS nodelet library
-
libopencv-apps-dev - Opencv_apps Robot OS package - development files
-
libopencv-apps1d - opencv_apps Robot OS package - runtime files
-
libpcl-conversions-dev - Robot OS library to convert from/to PCL data types
-
libpcl-msgs-dev - C/C++ headers for PCL-related Robot OS Messages
-
libpolled-camera-dev - Robot OS polled_camera package - development
-
libpolled-camera0d - Robot OS polled_camera package
-
librandom-numbers-dev - Robot OS random numbers library - development files
-
librandom-numbers0d - Robot OS random numbers library
-
libresource-retriever-dev - Robot OS resource_retriever library - development files
-
libresource-retriever0d - Robot OS resource_retriever library
-
librobot-state-publisher-dev - development files for Robot OS robot_state_publisher library
-
librobot-state-publisher-solver0d - Robot OS robot_state_publisher solver library
-
libros-rosgraph-msgs-dev - Messages relating to the Robot OS Computation Graph
-
librosbag-dev - Tools for recording from and playing back to Robot OS topics
-
librosbag-storage3d - Robot OS library for rosbag_storage
-
librosbag3d - Library for recording from and playing back to Robot OS topics
-
librosconsole-bridge-dev - Robot OS library for connecting console logging types
-
librosconsole-bridge0d - Robot OS library for connecting console logging types
-
libroscpp-core-dev - Development files for Robot OS roscpp-core
-
libroscpp-dev - Robot OS development files for libroscpp
-
libroscpp-msg-dev - Robot OS header for roscpp messages
-
libroscpp-serialization0d - Robot OS library for roscpp serialization
-
libroscpp2d - Robot OS client library
-
libroslib-dev - development files for roslib (Robot OS)
-
libroslib0d - library for roslib (Robot OS)
-
libroslz4-1d - library implementing lz4 for Robot OS
-
librospack-dev - Robot OS package information library header files
-
librospack0d - Robot OS package information library
-
librostest-dev - Development files for rostest (Robot OS)
-
librostime0d - Robot OS library for time and duration
-
librviz-dev - Development files for the Robot OS 3D visualization tool
-
librviz3d - Library for the Robot OS 3D visualization tool
-
libsensor-msgs-dev - Messages relating to Robot OS sensor, C/C++ interface
-
libshape-msgs-dev - Messages relating to Robot OS shape, C/C++ interface
-
libsmc-dev - Robot OS bond State Machine Compiler interface
-
libstd-msgs-dev - C/C++ headers for Standard Robot OS Messages
-
libstd-srvs-dev - Robot OS Common service definitions
-
libstereo-msgs-dev - Messages relating to Robot OS stereo, C/C++ interface
-
libtf-conversions-dev - Robot OS conversion library between Eigen, KDL and tf - development files
-
libtf-conversions0d - Robot OS conversion library between tf and Eigen and KDL
-
libtf-dev - Robot OS tf transform library - development files
-
libtf1d - Robot OS tf transform library to keep track of multiple coordinate frames
-
libtf2-1d - Robot OS tf2 transform library
-
libtf2-bullet-dev - Robot OS tf2 transform library for Bullet - dev files
-
libtf2-dev - Robot OS tf2 transform library - development files
-
libtf2-eigen-dev - Robot OS tf2 transform library for Eigen - dev files
-
libtf2-geometry-msgs-dev - Robot OS geometry messages for tf2 transform library - dev files
-
libtf2-kdl-dev - Robot OS tf2 transform library using Orocos-KDL - dev files
-
libtf2-msgs-dev - Robot OS messages for tf2 transform library - dev files
-
libtf2-ros-dev - Robot OS binding for tf2 transform library - dev files
-
libtf2-ros0d - Robot OS binding for tf2 transform library
-
libtopic-tools-dev - development files for libtopic-tools (Robot OS)
-
libtopic-tools1d - library for messing with Robot OS topics
-
libtrajectory-msgs-dev - Messages relating to Robot OS trajectory, C/C++ interface
-
libvisualization-msgs-dev - Messages relating to Robot OS visualization, C/C++ interface
-
libxmlrpcpp-dev - development files for Robot OS libxmlrpcpp
-
libxmlrpcpp2d - Robot OS version of xml-rpc protocol library
-
polled-camera-tool - Robot OS polled_camera package tool
-
python-actionlib - Robot OS actionlib library - Python 2 interface
-
python-actionlib-msgs - Messages relating to Robot OS actionlib, Python 2 interface
-
python-angles - Robot OS set of simple math utilities to work with angles (Python 2)
-
python-bloom - Bloom is a release automation tool from Robot OS (Python 2)
-
python-bond - Messages related to Robot OS bond_core - Python 2
-
python-camera-calibration-parsers - Robot OS camera_calibration_parsers Python 2 package
-
python-catkin-lint - Check Robot OS catkin packages for common errors
-
python-catkin-pkg - Low-level build system macros for Robot OS — Python 2 module
-
python-diagnostic-msgs - Messages relating to Robot OS diagnostic, Python 2 interface
-
python-dynamic-reconfigure - Robot OS dynamic-reconfigure library - Python 2 bindings
-
python-gencpp - C++ Robot OS message and service generators - Python 2 version
-
python-genlisp - Common-Lisp Robot OS message and service generators - Python 2 version
-
python-genmsg - Python 2 library for generating Robot OS message and service data
-
python-genpy - Python 2 Robot OS message and service generators
-
python-geometry-msgs - Messages relating to Robot OS geometry, Python 2 interface
-
python-image-geometry - image_geometry Robot OS package - Python 2 bindings
-
python-interactive-markers - Robot OS interactive_markers - Python 2 package
-
python-kdl-parser - Robot OS kdl_parser library - Python
-
python-laser-geometry - Robot OS laser geometry package - Python 2 bindings
-
python-message-filters - Python 2 library for Robot OS message-filters
-
python-nav-msgs - Messages relating to Robot OS nav, Python 2 interface
-
python-nodelet - Robot OS nodelet library - service files - Python 2
-
python-nodelet-topic-tools - Robot OS nodelet_topic_tools library - Python 2 service files
-
python-opencv-apps - opencv_apps Robot OS package - Python 2 bindings
-
python-pcl-msgs - Python 2 code for PCL-related Robot OS Messages
-
python-polled-camera - Robot OS polled_camera package - Python 2
-
python-qt-binding - Robot OS Python 2 bindings for QT
-
python-resource-retriever - Robot OS resource_retriever library - Python 2
-
python-rosbag - Python 2 tools for recording from and playing back to Robot OS topics
-
python-rosboost-cfg - Contains scripts used by the Robot OS rosboost-cfg tool (Python 2)
-
python-rosclean - cleanup Robot OS filesystem resources (e.g. logs) (Python 2)
-
python-roscreate - Robot OS empty package template creator (Python 2)))))))))
-
python-rosdep2 - rosdep package manager abstraction tool for Robot OS (Python 2)
-
python-rosdistro - Tool to work with rosdistro files (for Robot OS, Python 2)
-
python-rosgraph - Tool to print information about the Robot OS computation graph - Python 2
-
python-rosgraph-msgs - Messages relating to the Robot OS Computation Graph, Python 2 bindings
-
python-rosinstall - Installer for Robot OS (Python 2)
-
python-rosinstall-generator - files (for Robot OS) Python 2
-
python-roslaunch - roslaunch tool for Robot OS - Python 2
-
python-roslib - Python 2 library for roslib (Robot OS)
-
python-roslz4 - Python 2 library implementing lz4 for Robot OS
-
python-rosmake - rosmake is a Robot OS dependency aware build tool (Python 2)
-
python-rosmaster - Robot OS Master implementation - Python 2
-
python-rosmsg - Command-line tools for displaying information about Robot OS - Python 2
-
python-rosnode - Tool for displaying debug information about Robot OS - Python 2
-
python-rosparam - Tool for getting and setting Robot OS Parameters - Python 2
-
python-rospkg - Robot OS package library (Python 2)
-
python-rospy - Python 2 client library for Robot OS
-
python-rosservice - Command-line tool for listing and querying Robot OS services - Python 2
-
python-rostest - Test suite for Robot OS based on roslaunch - Python 2
-
python-rostopic - Tool for displaying debug information about Robot OS Topics - Python 2
-
python-roswtf - Tool for diagnosing issues with a running Robot OS system - Python 2
-
python-rviz - Python bindings for the 3D visualization tool for Robot OS
-
python-sensor-msgs - Messages relating to Robot OS sensor, Python 2 interface
-
python-shape-msgs - Messages relating to Robot OS shape, Python 2 interface
-
python-smclib - Robot OS bond State Machine Compiler Python 2 package
-
python-std-msgs - Python 2 interface for Standard Robot OS Messages
-
python-std-srvs - Robot OS Common service definitions, Python 2 bindings
-
python-stereo-msgs - Messages relating to Robot OS stereo, Python 2 interface
-
python-tf - Robot OS tf transform library - Python 2
-
python-tf2 - Robot OS tf2 transform library - Python 2
-
python-tf2-msgs - Robot OS messages for tf2 transform library - Python 2
-
python-tf2-ros - Robot OS binding for tf2 transform library - Python 2
-
python-tf2-sensor-msgs - Robot OS sensor messages for tf2 transform library - Python 2
-
python-topic-tools - Python 2 library for working with Robot OS topics
-
python-trajectory-msgs - Messages relating to Robot OS trajectory, Python 2 interface
-
python-visualization-msgs - Messages relating to Robot OS visualization, Python 2 interface
-
python-wstool - Commands to manage multi-VCS repositories (for Robot OS) Python 2
-
python3-actionlib - Robot OS actionlib library - Python 3 interface
-
python3-actionlib-msgs - Messages relating to Robot OS actionlib, Python 3 interface
-
python3-angles - Robot OS set of simple math utilities to work with angles (Python 3)
-
python3-bloom - Bloom is a release automation tool from Robot OS (Python 3)
-
python3-bond - Messages related to Robot OS bond_core - Python 3
-
python3-camera-calibration-parsers - Robot OS camera_calibration_parsers Python 3 package
-
python3-catkin-lint - Check Robot OS catkin packages for common errors (Python 3)
-
python3-catkin-pkg - Low-level build system macros for Robot OS — Python 3 module
-
python3-diagnostic-msgs - Messages relating to Robot OS diagnostic, Python 3 interface
-
python3-dynamic-reconfigure - Robot OS dynamic-reconfigure library - Python 3 bindings
-
python3-gencpp - C++ Robot OS message and service generators - Python 3 version
-
python3-genlisp - Common-Lisp Robot OS message and service generators - Python 3 version
-
python3-genmsg - Python 3 library for generating Robot OS message and service data
-
python3-genpy - Python 3 Robot OS message and service generators
-
python3-geometry-msgs - Messages relating to Robot OS geometry, Python 3 interface
-
python3-image-geometry - image_geometry Robot OS package - Python 3 bindings
-
python3-interactive-markers - Robot OS interactive_markers - Python 3 package
-
python3-laser-geometry - Robot OS laser geometry package - Python 3 bindings
-
python3-message-filters - Python 3 library for Robot OS message-filters
-
python3-nav-msgs - Messages relating to Robot OS nav, Python 3 interface
-
python3-nodelet - Robot OS nodelet library - service files - Python 3
-
python3-nodelet-topic-tools - Robot OS nodelet_topic_tools library - Python 3 service files
-
python3-opencv-apps - opencv_apps Robot OS package - Python 3 bindings
-
python3-pcl-msgs - Python 3 code for PCL-related Robot OS Messages
-
python3-polled-camera - Robot OS polled_camera package - Python 3
-
python3-qt-binding - Robot OS Python 3 bindings for QT
-
python3-resource-retriever - Robot OS resource_retriever library - Python 3
-
python3-rosbag - Python 3 tools for recording from and playing back to Robot OS topics
-
python3-rosboost-cfg - Contains scripts used by the Robot OS rosboost-cfg tool (Python 3)
-
python3-rosclean - cleanup Robot OS filesystem resources (e.g. logs) (Python 3)
-
python3-roscreate - Robot OS empty package template creator (Python 3)))))))))
-
python3-rosdep2 - rosdep package manager abstraction tool for Robot OS (Python 3)
-
python3-rosdistro - Tool to work with rosdistro files (for Robot OS, Python 3)
-
python3-rosgraph - Tool to print information about the Robot OS computation graph - Python 3
-
python3-rosgraph-msgs - Messages relating to the Robot OS Computation Graph, Python 3 bindings
-
python3-rosinstall - Installer for Robot OS (Python 3)
-
python3-rosinstall-generator - files (for Robot OS) Python 3
-
python3-roslaunch - roslaunch tool for Robot OS - Python 3
-
python3-roslib - Python 3 library for roslib (Robot OS)
-
python3-roslz4 - Python 3 library implementing lz4 for Robot OS
-
python3-rosmake - rosmake is a Robot OS dependency aware build tool (Python 3)
-
python3-rosmaster - Robot OS Master implementation - Python 3
-
python3-rosmsg - Command-line tools for displaying information about Robot OS - Python 3
-
python3-rosnode - Tool for displaying debug information about Robot OS - Python 3
-
python3-rosparam - Tool for getting and setting Robot OS Parameters - Python 3
-
python3-rospkg - Robot OS package library (Python 3)
-
python3-rospy - Python 3 client library for Robot OS
-
python3-rosservice - Command-line tool for listing and querying Robot OS services - Python 3
-
python3-rostest - Test suite for Robot OS based on roslaunch - Python 3
-
python3-rostopic - Tool for displaying debug information about Robot OS Topics - Python 3
-
python3-roswtf - Tool for diagnosing issues with a running Robot OS system - Python 3
-
python3-sensor-msgs - Messages relating to Robot OS sensor, Python 3 interface
-
python3-shape-msgs - Messages relating to Robot OS shape, Python 3 interface
-
python3-smclib - Robot OS bond State Machine Compiler Python 3 package
-
python3-std-msgs - Python 3 interface for Standard Robot OS Messages
-
python3-std-srvs - Robot OS Common service definitions, Python 3 bindings
-
python3-stereo-msgs - Messages relating to Robot OS stereo, Python 3 interface
-
python3-tf - Robot OS tf transform library - Python 3
-
python3-tf-conversions - Robot OS conversion library between Eigen, KDL and tf - Python 3 interface
-
python3-tf2 - Robot OS tf2 transform library - Python 3
-
python3-tf2-geometry-msgs - Robot OS tf2 transform library for Bullet - Python 3
-
python3-tf2-kdl - Robot OS tf2 transform library using Orocos-KDL - Python 3
-
python3-tf2-msgs - Robot OS messages for tf2 transform library - Python 3
-
python3-tf2-ros - Robot OS binding for tf2 transform library - Python 3
-
python3-tf2-sensor-msgs - Robot OS sensor messages for tf2 transform library - Python 3
-
python3-topic-tools - Python 3 library for working with Robot OS topics
-
python3-trajectory-msgs - Messages relating to Robot OS trajectory, Python 3 interface
-
python3-visualization-msgs - Messages relating to Robot OS visualization, Python 3 interface
-
python3-wstool - Commands to manage multi-VCS repositories (for Robot OS) Python 3
-
ros-actionlib-msgs - Messages relating to Robot OS actionlib, definitions
-
ros-base - Python Robot OS base metapackage
-
ros-base-dev - Robot OS base development metapackage
-
ros-base-lisp-dev - Lisp Robot OS base development metapackage
-
ros-base-python-dev - Python Robot OS base development metapackage
-
ros-cmake-modules - Robot OS CMake Modules
-
ros-core - Robot OS core metapackage
-
ros-core-dev - Robot OS core development metapackage
-
ros-core-lisp-dev - Lisp Robot OS core development metapackage
-
ros-core-python-dev - Python Robot OS core development metapackage
-
ros-core-rosbuild-dev - Robot OS rosbuild core development metapackage
-
ros-desktop - Robot OS desktop metapackage
-
ros-desktop-dev - Robot OS desktop development metapackage
-
ros-desktop-full - Robot OS desktop-full metapackage
-
ros-desktop-full-dev - Robot OS desktop-full development metapackage
-
ros-desktop-full-lisp-dev - LISP Robot OS desktop-full development metapackage
-
ros-desktop-full-python-dev - Python Robot OS desktop-full development metapackage
-
ros-desktop-lisp-dev - LISP Robot OS desktop development metapackage
-
ros-desktop-python-dev - Python Robot OS desktop development metapackage
-
ros-diagnostic-msgs - Messages relating to Robot OS diagnostic, definitions
-
ros-environment - Robot OS environment hooks
-
ros-geometry-msgs - Messages relating to Robot OS geometry, definitions
-
ros-message-generation - Generates build-time messaging dependencies for Robot OS packages
-
ros-message-runtime - Generates runtime messaging dependencies for Robot OS package
-
ros-mk - Robot OS make file helpers
-
ros-nav-msgs - Messages relating to Robot OS nav, definitions
-
ros-opencv-apps - opencv_apps Robot OS package - apps
-
ros-pcl-msgs - Definitions of PCL-related Robot OS Messages
-
ros-perception - Python Robot OS perception metapackage
-
ros-perception-dev - Robot OS perception development metapackage
-
ros-perception-lisp-dev - LISP Robot OS perception development metapackage
-
ros-perception-python-dev - Python Robot OS perception development metapackage
-
ros-robot - Python Robot OS robot metapackage
-
ros-robot-dev - Robot OS robot development metapackage
-
ros-robot-lisp-dev - LISP Robot OS robot development metapackage
-
ros-robot-python-dev - Python Robot OS robot development metapackage
-
ros-robot-state-publisher - Robot OS robot_state_publisher
-
ros-roscpp-msg - Robot OS definitions of roscpp messages
-
ros-rosgraph-msgs - Messages relating to the Robot OS Computation Graph, definitions
-
ros-sensor-msgs - Messages relating to Robot OS sensor, definitions
-
ros-shape-msgs - Messages relating to Robot OS shape, definitions
-
ros-simulators - Python Robot OS simulators metapackage
-
ros-simulators-dev - Robot OS simulators development metapackage
-
ros-simulators-lisp-dev - LISP Robot OS simulators development metapackage
-
ros-simulators-python-dev - Python Robot OS simulators development metapackage
-
ros-std-msgs - Message definitions for Standard Robot OS Messages
-
ros-std-srvs - Robot OS Common service definitions, definitions
-
ros-stereo-msgs - Messages relating to Robot OS stereo, definitions
-
ros-tf2-msgs - Robot OS messages for tf2 transform library - definitions
-
ros-topic-tools-srvs - service templates files for libtopic-tools (Robot OS)
-
ros-trajectory-msgs - Messages relating to Robot OS trajectory, definitions
-
ros-visualization-msgs - Messages relating to Robot OS visualization, definitions
-
ros-viz - Python Robot OS viz metapackage
-
ros-viz-dev - Robot OS viz development metapackage
-
ros-viz-python-dev - Python Robot OS viz development metapackage
-
rosbash - Assorted shell commands for using Robot OS with bash
-
rosbuild - scripts for managing the Robot OS build system
-
roslang - Robot OS client libraries
-
roslisp - Lisp client library for Robot OS
-
rosout - Robot OS system-wide logging mechanism
-
rospack-tools - command-line tool for retrieving information about Robot OS packages
-
rviz - 3D visualization tool for Robot OS
-
tf-tools - Set of utilities to operate with the Robot OS tf lib
-
tf2-tools - Robot OS tool for tf2 transform library second generation
-
topic-tools - Tools for messing with Robot OS topics
Here is an official list of Debian ROS packages.
Environment Setup
ROS needs a lot of packages, but wait until you see how many environment variables it needs! For the old distributions of ROS that were not well integrated into the native Linux distros, this was quite a mess. Fortunately the environmental stuff was encapsulated in a configuration script that can be sourced. With Debian Stretch and later this heavy handed environment tweaking isn’t needed since things are installed properly (PYTHONPATH legitimately contains ROS modules, etc).
Yes, it looks like with ROS on Debian 9 Stretch that you don’t need to worry about any of the environment stuff because all of the default paths are sufficient. Here is some affirmation of that idea.
Fast forward to 2022 and it seems like people weren’t too clear on the concept of properly installing software on a computer and overwhelmingly reverted back to questionable nonsense with turtle named "distributions" running on Ubuntu. Only Ubuntu. Ok, fine, whatever. But if that’s where you find yourself, you will need to sort out the baroque environment requirements. This is the main step as far as I can tell.
source /opt/ros/melodic/setup.bash
After doing this you’ll be able to run a lot of important things
(e.g. roscore
) without hunting their absolute paths down first.
It is so important to have this activated that the normal person (i.e.
doesn’t really use or care about Linux normally) way to solve it is to
source it from their .bashrc.
Packages
There are a lot of "packages". These can be viewed with rospack
list
. Here are the ones that start with ^ros
.
-
rosbag /usr/share/rosbag
-
rosbag_storage /usr/share/rosbag_storage
-
rosbash /usr/share/rosbash
-
rosbuild /usr/share/rosbuild
-
rosclean /usr/share/rosclean
-
rosconsole /usr/share/rosconsole
-
rosconsole_bridge /usr/share/rosconsole_bridge
-
roscpp /usr/share/roscpp
-
roscpp_serialization /usr/share/roscpp_serialization
-
roscpp_traits /usr/share/roscpp_traits
-
roscreate /usr/share/roscreate
-
rosgraph /usr/share/rosgraph
-
rosgraph_msgs /usr/share/rosgraph_msgs
-
roslang /usr/share/roslang
-
roslaunch /usr/share/roslaunch
-
roslib /usr/share/roslib
-
roslisp /usr/share/roslisp
-
roslz4 /usr/share/roslz4
-
rosmaster /usr/share/rosmaster
-
rosmsg /usr/share/rosmsg
-
rosnode /usr/share/rosnode
-
rosout /usr/share/rosout
-
rospack /usr/share/rospack
-
rospy /usr/share/rospy
-
rosservice /usr/share/rosservice
-
rostest /usr/share/rostest
-
rostime /usr/share/rostime
-
rostopic /usr/share/rostopic
-
rosunit /usr/share/rosunit
This provides an idea of what these are (and where they are) but there are tons more than the ones shown here.
What Version?
Need to know what version of ROS you are seeing?
rosversion -d
Or for ROS2, of course it’s different. May work for ROS1 too.
echo $ROS_DISTRO
Architectural Overview And Terminology
-
ROS - Robot Operating System
-
Perception
-
Decision making
-
Actuation
-
-
A node is a Unix process responsible for some aspect of the system. Could be nodes for…
-
wheel encoder
-
camera
-
position estimator
-
behavior execution
-
motor control
-
-
Coordinated by the ROS Master Process (
roscore
)-
Allows nodes to locate each other and communicate
-
Parameter server - stores shared config values (like wheel radius, used by many nodes maybe)
-
Nodes can pass messages using topics which are named buses similar to a pipe. Nodes must publish to the topic to communicate. The receiver must subscribe to the topic. pub-sub architecture (publish/subscribe)
-
-
Messages - Over 200 different message types, such as
-
Physical Quantities
-
Positions
-
Velocities
-
Accelerations
-
Rotations
-
Durations
-
-
Sensor Readings
-
Laser scans
-
Images
-
Point clouds
-
inertial measurements
-
-
Define your own
-
-
Messages can contain any kind of data
-
text
-
images
-
rotation
-
pose
-
velocity_cmd
-
-
Request-Response (as opposed to pub/sub) is supported too by "Services" Allow the passing of messages between nodes, unlike messages, not a bus. E.g. if the "behavior executor" node needs an image from the "camera" node but it doesn’t want to subscribe to every frame the camera publishes, then it can use a service and request an image only when needed. Of course in practice that (common!) example is very misleading because if instead of an image specifically, which is provided for, you need to do a simple transfer of an arbitrary file (a la wget, curl, rsync, scp, etc) it can be very tricky. Ideally you want to pass just a String type message containing the URI or path where the file can be found. Heaven help you if that’s not possible.
-
Diagrams of all the nodes and what they communicate with are called "compute graphs". rqtgraph is a tool to help diagram these.
Environment Hassles
A fun problem that pops up for me a lot is a simple command like
rosmsg
seems to just not exist. Don’t panic, in normal (well ROS
normal anyway) installations all of the useful features are in the
wrong places and fixed with a heavy handed dose of unwelcome meddling
with your shell environment. Fun!
So make sure you can do something like this and then do it.
source /opt/ros/melodic/setup.bash
Specifically it looks like it adds this to the front of your PATH
.
/opt/ros/melodic/bin/
In reality, sourcing setup.bash
sets off an incomprehensible chain
reaction that includes running /opt/ros/melodic/_setup_util.py
and
god knows what else.
Terms
-
node = A component in a ROS system graph.
-
topic = Kind of like a VLAN for the robot’s messages. Aka "named bus".
-
message = The data that is passed.
-
tf = It could mean "track frames". Or maybe "transform". Not TensorFlow.
-
service = A service a node can make available to request from. Like a camera node providing an image when requested.
-
action = Something like a service. But not quite. Just triggers.
-
publisher/subscriber = a feature that allows a node to get all stuff published by another node.
Discussion about when it’s best to use a topic vs. a service.
roscore - The Master Process
The master process, roscore
usually needs to be running somewhere
in order to coordinate things with ROS components. Here are some of
its functions.
-
Providing naming and registration services to other running nodes
-
Tracking all publishers and subscribers
-
Aggregating log messages generated by the nodes
-
Facilitating connections between nodes
Just run it by opening a screen term and typing roscore
. That’s it.
It seems the customary way to stop it is to just SIGINT (Ctrl-C).
To run processes on multiple hosts you’ll need to let ROS know where the master roscore is. Do that by setting this variable (best to do it on all hosts involved including the obvious roscore).
export ROS_MASTER_URI=http://myroscore.tld:11311
Also make sure that ${ROS_IP}
is set as an environment variable on
the core machine.
Check with rostopic list
or maybe rostopic echo /mytopic
from the
non-core machines.
Official help with multiple hosts.
catkin
ROS has a couple of build and package systems (I guess like dpkg
and
rpm
). A mildly obsolete one is
rosbuild (sometimes described as "dry").
The main one today seems to be
catkin ("wet").
catkin packages
A catkin package may contain these things.
-
package.xml
- information about the package required -
CMakeLists.txt
- a file with build instructions required -
source code - for ROS nodes perhaps
-
scripts
- Python executables -
src
- source code (presumably C & Cpp)
-
-
libraries
-
datasets
-
other stuff
-
msg
- custom message type definitions -
srv
- custom call/response types -
launch
- configuration to run multiple nodes at once (ROS docs) -
config
- configuration files
-
To create a catkin package
cd ${P}/catkin_ws/src
catkin_create_pkg my_lil_package
catkin workspaces
To create a "catkin package" you’ll want a "catkin workspace". A catkin workspace is a directory where packages are built, modified, and installed, (the top level therefor). Correspondingly catkin packages are the directories (zip? gzip?)
Steps to creating a catkin workspace.
mkdir -p ${MYPATH}/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ..
catkin_make
Apparently there is also a catkin_make clean
too.
Turtle
Turtlesim is a project desined to teach beginners about ROS. Unfortunately if you know absolutely nothing about the ROS jungle, even getting to the starting line can be extremely challenging. This was especially true for me with Debian 9 which has much better support for ROS than it seems any other distribution. That’s very ironic but the problem is that most documentation assumes a more challenging environment. It does look like turtlesim is not included with Debian’s packages by default. I did finally get it working on Debian 9 Stretch.
The first thing to note, turtlesim requires the installation of this QT package which the entire ROS did not require:
qtbase5-dev
Then you must acquire (from Github) and build the ros_tutorials. Here’s what I did.
C=/tmp/catkin_ws
mkdir -p $C/src ; cd $C/src
git clone https://github.com/ros/ros_tutorials/
cd $C
catkin_make
source devel/setup.bash
If all that goes well, you can then try running it. On two (more than
the roscore) terminals run these. Don’t forget to be in the
catkin_ws
directory and source the devel/setup.bash
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
If you can drive the little turtlebot around, then your Ros is working fine.
rosdep
The rosdep
command can check on dependency requirements and fulfill
them.
The first thing that must be done is to initialize this command’s operation. Or whatever it’s doing.
sudo rosdep init # Changes: /etc/ros/rosdep/sources.list.d/20-default.list
rosdep update # Changes: ~/.ros/rosdep/sources.cache
Here is an example of how to use it.
rosdep check simple_arm
This didn’t exactly work perfectly for me because of some messiness
failing to evolve with the new Debian 9 native install.
I tried adding this --os=debian:stretch
but it still didn’t produce
great effects.
In theory you can do this.
rosdep install -i simple_arm
Which should round up all the dependencies and install them. In practice, I was just going to github and getting them manually.
roslaunch
The roslaunch
feature starts things running but unlike rosrun
it
can launch multiple nodes simultaneously and automatically. It can
also set default parameters on the parameter server. It can also act
as a keep-alive to respawn dead processes.
roslaunch simple_arm robot_spawn.launch
simple_arm
Had a hell of a time trying to get this sample project to run in Debian 9. Here is my Debian 9 script.
#!/bin/bash
MYPATH=/tmp
mkdir -p ${MYPATH}/catkin_ws/src
cd ${MYPATH}/catkin_ws/src
catkin_init_workspace
C=1
DEPS="https://github.com/udacity/simple_arm "
DEPS+="https://github.com/ros/roslint "
DEPS+="https://github.com/ros/xacro "
DEPS+="https://github.com/ros-simulation/gazebo_ros_pkgs "
DEPS+="https://github.com/ros-simulation/gazebo_ros_demos "
DEPS+="https://github.com/ros/diagnostics "
DEPS+="https://github.com/ros-controls/control_toolbox "
DEPS+="https://github.com/ros-controls/control_msgs "
DEPS+="https://github.com/ros-controls/realtime_tools "
DEPS+="https://github.com/ros-controls/ros_controllers "
DEPS+="https://github.com/ros-controls/ros_control "
for P in ${DEPS}; do echo $((C++)); git clone ${P}; done
cd ${MYPATH}/catkin_ws/src/xacro
ln -s xacro.py xacro # Fixing a deprecation problem.
cd ${MYPATH}/catkin_ws/
echo "FIX catkin_ws/src/simple_arm/CMakeLists.txt find_package"
sed -i '/controller_manager/d' ${MYPATH}/catkin_ws/src/simple_arm/CMakeLists.txt
catkin_make
#source devel/setup.bash
#roslaunch simple_arm robot_spawn.launch
Maybe it also needs the Debian equivalent of these: * ros-kinetic-control-toolbox * ros-kinetic-forward-command-controller * ros-kinetic-joint-limits-interface * ros-kinetic-transmission-interface * ros-kinetic-control-toolbox * ros-kinetic-effort-controllers * ros-kinetic-forward-command-controller * ros-kinetic-gazebo-ros-control * ros-kinetic-joint-limits-interface * ros-kinetic-joint-state-controller * ros-kinetic-transmission-interface
Running Demos
This is an example of the kinds of things necessary to run ROS stuff. It’s encapsulated in a handy Bash script so that each part that must be started in a separate terminal can be done so easily.
#!/bin/bash CWS=/home/xed/U/ws/catkin_ws/ CWSS=$CWS/src # First terminal function Usage { echo "Usage: $0 N" echo "Run each part of the ROS experience in its own terminal." echo " 1 - ROS core" echo " 2 - Create and run the hello world program." echo " 3 - Set up workspace and arm environment." echo " 4 - Run code that moves arm." } function Core { roscore ;} function Hello { HDIR=$CWSS/simple_arm/scripts mkdir -p $HDIR echo '#!/bin/bash' > $HDIR/hello echo 'echo "The hello program is running."' >> $HDIR/hello chmod 755 $HDIR/hello cd $CWS catkin_make source $CWS/devel/setup.bash rosrun simple_arm hello } function Arm { mkdir -p $CWSS cd $CWSS catkin_init_workspace git clone https://github.com/udacity/simple_arm.git simple_arm cd $CWS catkin_make source $CWS/devel/setup.bash roslaunch simple_arm robot_spawn.launch # Problems: # Make sure the package `ros-kinetic--controller-manager` is installed. # rosdep check simple_arm # rosdep install -i simple_arm } function Armmv { source $CWS/devel/setup.bash rosrun simple_arm simple_mover } case ${1:-0} in 0)Usage;; 1)Core;; 2)Hello;; 3)Arm;; 4)Armmv;; *)Usage;; esac
Status
There are special commands to check up on what the ROS is doing.
The rosnode list
command shows which nodes are active. This is what
it looks like when running turtlesim
.
$ rosnode list
/rosout
/teleop_turtle
/turtlesim
Note that /rosout
is automatically launched by the ROS master and is
responsible for aggregating and filtering text messages into log files.
Another way to query the running system’s activity is to use rostopic
list
. Here’s what it looks like in the same context as before.
$ rostopic list
/rosout
/rosout_agg
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose
-
/rosout_agg
Aggregated feed of messages published to/rosout
. -
/turtle1/cmd_vel
Topic for communicating velocity commands. Publishing a velocity message to this topic will move the turtle. -
/turtle1/color_sensor
Turtles have color sensors which are published to this topic. -
/turtle1/pose
The position and orientation of turtle1 are published to this topic.
You can get more details about a specific topic. Note the full path as
listed in rostopic list
is required.
$ rostopic info /turtle1/color_sensor
Type: turtlesim/Color
Publishers:
* /turtlesim (http://usb64:45023/)
Subscribers: None
To get more information about the type of a message, use the rosmsg
show
command. Here we see more details of the geometry_msgs/Twist
type associated with the /turtle1/cmd_vel
topic.
$ rostopic info /turtle1/cmd_vel | head -n1
Type: geometry_msgs/Twist
$ rosmsg show geometry_msgs/Twist
geometry_msgs/Vector3 linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3 angular
float64 x
float64 y
float64 z
You can also just have a look at the files that define these things if you can find them.
$ cat src/ros_tutorials/turtlesim/msg/Color.msg
uint8 r
uint8 g
uint8 b
$ cat src/ros_tutorials/turtlesim/msg/Pose.msg
float32 x
float32 y
float32 theta
float32 linear_velocity
float32 angular_velocity
Some people think that rosed can be helpful for finding and editing these files.
If you want to monitor a topic in real time, you can use rostopic
echo
. This will spew tons of transaction details as the system
operates.
$ rostopic echo /turtle1/cmd_vel
linear:
x: 2.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
---
-
rosservice
-
rosparam
rqt_plot
You can have a display of a real time values plotted on Y scrolling across a plot.
This is pretty easy to use if you have values that are being published on topics. Fire up this viewer and select what topic to view. Or specify it directly. Something like this.
rqt_plot /vehicle/throttle_cmd
ROS Logging
Logging is coordinated by roscore
. Here are some types of logging
and where they output to.
-
rospy.logdebug(…) - log file
-
rospy.loginfo(…) - stdout, log file
-
rospy.logwarn(…) - stderr, log file,
/rosout
-
rospy.logerr(…) - stderr, log file,
/rosout
-
rospy.logfatal(…) - stderr, log file,
/rosout
Logging can occur on the ROS topic /rosout
.
Check out: rostopic echo /rosout
It is also useful to know how to check on how much space a log is using and how to get rid of it.
rosclean check
rosclean purge
That purge seems to just delete the log file after prompting you for confirmation. What it helped me with is finding the damn thing.
less /root/.ros/log
ROS Publishers
A publisher puts messages on a topic so that other subscribing nodes can receive it. Here is how it is set up in Python.
pub1= rospy.Publisher("/topic_name", message_type, queue_size=size)
To actually publish a specific message involves something like this.
pub1.publish(message)
Official details here.
If more than one publisher sends a message to a topic, it can block
unless there is a queue set up with queue_size
. When a queue is
configured the system is asynchronous.
Here is a good example of a simple publisher and subscriber that uses real numeric values (instead of the stupid stock ROS example of strings).
ROS Subscribers
sub1= rospy.Subscriber("/topic_name", message_type, callback_function)
The callback_function
is run anytime a message is received; it can
simply pass
.
ROS Parameters
The roscore
process manages the state of parameters which are a
bit like the entire system’s constants and variables.
This can be used to change parameters for a running system.
rosparam set /arm_mover/max_joint_2_angle 1.57
rospy
The Python library for doing ROS things is rospy
. It can create
nodes, and do all the things that can be done. Official documentation
is here.
The first thing that has to happen is a node must be initialized.
rospy.init_node('node_name')
You can get a time marker with this.
rospy.Time.now().to_sec()
Service
Request-Response (as opposed to pub/sub) is supported too by "Services". For example, allows a node to request an image from the camera publisher only when needed.
The Python way to create a service.
service= rospy.Service('service_name', serviceClassName, handler)
-
service_name
- used by other nodes to specify this service. -
serviceClassName
- refers to an.srv
file belonging to each service. -
handler
- callback to do the service’s function. The service call message is passed as an argument. It should return a proper service response message.
There are several ways to use a service. They can be called from the
command line directly. Here is how to use a service from another node.
Set up a ServiceProxy
.
service_proxy= rospy.ServiceProxy('service_name',serviceClassName)
Now it can be called.
msg= serviceClassNameResponse()
#Modify msg with desired message here.
response= service_proxy(msg)
Services can also be called something like this.
rosservice call /arm_mover/safe_move "joint_1: 1.57
joint_2: 1.57"
Yes, there is a weird hard return in there.
Services are defined in special directories like
catkin_ws/src/myproj/srv
which should be created if necessary. The
service definitions end in .srv
and contain stuff like this.
float64 joint_1
float64 joint_2
---
duration time_elapsed
The top section above the ---
is for service requests and the bottom
part is for responses. In the example above, the request takes two
joint positions and returns how long the operation took.
Minimal Service Example
Used this guide: https://www.intorobotics.com/ros-service-practical-example/
cat /etc/apt/sources.list.d/ros-latest.list # = deb http://packages.ros.org/ros/ubuntu bionic main
apt install ros-melodic-desktop-full
source /opt/ros/melodic/setup.bash
mkdir -p catkin_ws/src
cd catkin_ws/src/
catkin_create_pkg ros_service rospy
cd ..
catkin_make
source devel/setup.bash
roscd ros_service
mkdir srv
vi srv/ServiceExample.srv
vi package.xml
vi CMakeLists.txt
cd ../..
catkin_make
source devel/setup.bash
cd src/ros_service/srv/
vi callService.py
chmod 755 callService.py
roscore &
rosrun ros_service callService.py &
rosservice call service_example '0'
#!/usr/bin/env python
import rospy
#import the code generated by catkin.
#we need ServiceExample for the first message type,
#and the ServiceExampleResponse from the second message type from the ServiceExample.srv file
from ros_service.srv import ServiceExample, ServiceExampleResponse
def turn_on_off(mess):
if mess.onezero==1:
return ServiceExampleResponse('ON')
else:
return ServiceExampleResponse('OFF')
rospy.init_node('service_respond')
service=rospy.Service('service_example',ServiceExample,turn_on_off)
rospy.spin()
Messages
Messages are similar to how services are defined except they use
the msg
directory and have only one section without a divider.
To use messages you need to have these in your
catkin_ws/src/myproj/CMakeLists.txt
file in the find_package
section.
-
std_msgs
package contains definitions for common message types. -
message_generation
is a library required to properly compose messages.
Official relevant documentation
ROS Exceptions
ROS uses many special exceptions. Here is list of ROS exceptions.
rqt
-
rqt_image_view - Shows realtime feeds of the images in the ROS topics.
-
rqt_plot - Shows real time plot of selected topic values.
-
rqt_graph - This should be able to show a diagram of the ROS computation graph (all the nodes, etc). In practice I can’t find it installed.
bag
Extract images from bag files.
Check what the images in your bag are published on with rostopic
list
while playing. If your bag has a topic called /image_raw
you
can do this to extract the images.
roscore
rosrun image_view image_saver image:=/image_raw
rosbag play my_ros_data.bag
Logs And The Less Obtrusive Absence Of Logs
Here’s how I used the real OS to suppress ROS' overactive logging enthusiasm. I know there are better ways, but not for me.
To make this work, start with sym linking this away:
ln -s /dev/shm/roslog ~/.ros/log
Then this clears the previous run before starting.
#!/bin/bash
cd /home/xed/u/ateam/ros
mkdir -p /dev/shm/roslog; touch ~/.ros/log/ok
sudo rm -rv ~/.ros/log/*
D=$(date)
catkin_make && \
source devel/setup.sh && \
roslaunch launch/styx.launch && \
echo $D # Date at start.
date # Date at finish.
Rviz
This is for running on the same machine as the other parts of your ROS empire. If you want to run the monitoring on a different workstation, obviously you’ll need to point this to where the action is. But the basic idea is the same.
export ROS_IP=127.0.0.1
export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://127.0.0.1:11311
Once the environment is happy, start rviz like this.
rosrun rviz rviz
Hints for point cloud - Under the "Global Options" node in the tree, look for the "Fixed Frame" node. Change that from "map" to "base_link". Go to "Add" button at bottom under "Fixed Frame" box and choose "PointCloud2". Click on its subnode "Topic" and add "/mytopic/points" or whatever is being published that you’re trying to look at. Change the "Size(m)" node from .01m to .1m if needed.
C++ ROS
Compiling Something
Create a project directory.
mkdir xros && cd xros
In that directory make a file like this. Note the add_executable()
function which will be required for every executable you need.
# CMakeLists.txt - A Minimal Example
# This file must be prepared before building can begin.
cmake_minimum_required(VERSION 2.8.3)
project(radrxros)
# == Includes
find_package(roscpp REQUIRED)
find_package(std_msgs REQUIRED)
include_directories(${roscpp_INCLUDE_DIRS})
include_directories(${std_msgs_INCLUDE_DIRS})
# == One of these is needed for each executable.
add_executable(radrxros radrxros.cpp)
target_link_libraries(radrxros ${roscpp_LIBRARIES} ${std_msgs_LIBRARIES})
# == Optional installation.
install(TARGETS radrxros
DESTINATION bin)
At this point it would be wise to create or otherwise obtain your program. I’m not sure this is required, but play along and put it in the top of the project directory tree.
vim ./xros.cpp
You need a build directory to start the cmake. Go down a directory to
point your cmake back up a directory. Use the optional -Wno-dev
to
suppress the avalanche of useless warnings not intended for users of
ROS… Look, I didn’t design this garbage.
mkdir build && cd build
cmake .. -Wno-dev
make
./xros
The executable is deposited in this build directory and can be run from there.