-
Notifications
You must be signed in to change notification settings - Fork 7
ROS
The Robotic Operating System (ROS) is a management solution for real-time robotic software. ROS provides simple and robust interfaces for communication between software, while allowing for the complete logging of the system. Most popular software packages, such as OpenCV, Mavlink, Python, and MatLab, have a ROS compatible component to allow for easy integration. Additionally, there is a huge amount of user packages available on the community network.
One major advantage of ROS is that it provides access as a Distributed Network. Each and any node can be ran on different hardware, but will still communicate as if it were all on the same computer, if the network is properly configured. For this reason, a navigation controller and user interface can be ran on a GCS, while the flight control software is ran on-board with the image processing, while the images are post-processed on a second GCS and made available over a web interface. This drastically simplifies the work needed to write interfaces such as sockets and data streams to pass information between the separate systems.
As of the time of writing, it is probably best to use ROS Kinetic (and Ubuntu 16.xx as a result). This is as Kinetic is the current Long Term Release, and should offer the most support for any issues.
For more information, please check: http://wiki.ros.org/
A key idea behind ROS is that it always runs assuming it was on a distributed network. When this is not the case, all information in ROS points towards "localhost". What this means is that when we want to run ROS over a network using multiple systems, all we need to do is change some of these assumptions.
There are 2 main environment variables (ones that you set through the terminal/bash/ssh/etc.) that must be set:
- ROS_MASTER_URI: information on where the ROS master is located, and how it should be contacted.
- ROS_IP: Information on the device that is sending data (and where to connect to for other nodes).
In short, these are the commands needed for each variable. They will need to be set for each and every terminal session that is opened (as the environment is flushed on each new session). For example, the addresses "192.168.1.XXX" and "192.168.1.YYY" refer to the master and slave addresses respectively.
This variable need to be set on the master:
export ROS_IP=192.168.1.XXX
These variables need to be set on the slave:
export ROS_IP=192.168.1.YYY
export ROS_MASTER_URI=http://192.168.1.YYY:11311
To save some time, you could add the following function to the ".bashrc" file. This will allow you to call the command "kinetic" to automatically configure the ROS master, and allow you to call "kinetic 192.168.1.YYY".
kinetic() {
# Setup for distributed ROS
export ROS_IP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
echo "Identifying as: $ROS_IP"
if [ "$#" -eq 1 ]
then
export ROS_MASTER_URI=http://$1:11311
echo "Connecting to: $ROS_MASTER_URI"
fi
}
- Home
- Common Terminology
- UAV Setup Guides (2024)
- UAV Setup Guides (2022)
- UAV Setup Guides (2021)
- UAV Setup Guides (--2020)
- General Computing
- On-Board Computers
- ROS
- Sensors & Estimation
- Flight Controllers & Autopilots
- Control in ROS
- Navigation & Localization
- Communications
- Airframes
- Power Systems
- Propulsion
- Imagery & Cameras
- Image Processing
- Web Interfaces
- Simulation