In this exercise, we will setup ROS to be used from the terminal, and start roscore
In order to start programming in ROS, you should know how to install ROS on a new machine as well and check that the installation worked properly. This module will walk you through a few simple checks of your installed ROS system. Assuming you are working from the VM, you can skip any installation instructions as ROS is already installed.
Further Information and Resources¶
Scan-N-Plan Application: Problem Statement¶
We believe we have a good installation of ROS but let’s test it to make sure.
Scan-N-Plan Application: Guidance¶
If you are ever having problems finding or using your ROS packages make sure that you have your environment properly setup. A good way to check is to ensure that environment variables like ROS_ROOT and ROS_PACKAGE_PATH are set:
printenv | grep ROS
If they are not then you might need to ‘source’ some setup.*sh files.
In a “bare” ROS install, you will need to run this command on every new shell you open to have access to the ROS commands. One of the setup steps in a typical ROS install is to add that command to the end of your
~/.bashrcfile, which is run automatically in every new terminal window. Check that your
.bashrcfile has already been configured to source the ROS-kinetic
This process allows you to install several ROS distributions (e.g. indigo and kinetic) on the same computer and switch between them by sourcing the distribution-specific
roscore is a collection of nodes and programs that are pre-requisites of a ROS-based system. You must have a roscore running in order for ROS nodes to communicate. It is launched using the roscore command.
roscore will start up:
- a ROS Master
- a ROS Parameter Server
- a rosout logging node
You will see ending with
started core service [/rosout]. If you see
roscore: command not foundthen you have not sourced your environment, please refer to section 5.1. .bashrc Setup.
To view the logging node, open a new terminal and enter:
The logging node is named /rosout
Press Ctrl+C in the first terminal window to stop roscore. Ctrl-C is the typical method used to stop most ROS commands.