-
-
Notifications
You must be signed in to change notification settings - Fork 17
Home
Welcome to the Wiki for MRover's Autonomy ROS Package.
ROS is an open source framework for developing robotics software. It is short for robot operating system, but it is not truly an operating system like Ubuntu or Windows. Instead it is "middle-ware" that provides some common things needed for a robotic system. Robots typically run many pieces of software ranging from high level autonomy like computer vision to lower level software like device drivers and control loops. In many cases, this software is even distributed across computing devices such as on peripheral microcontrollers driving sensors or on high powered servers communicating with onboard computers via radio. ROS provides the following capabilities:
- Interprocess communication via publisher-subscriber model
- Communication between distributed processes over serial, network, and other types of connections
- Its own build system (Catkin) that isolates build environments and provides simple dependency resolution
- Package management to rapidly pull in and run existing open-source ROS code and libraries for your robot
- Tight integration with the Gazebo simulation environment
- Fantastic tooling and infastructure for things like IK, motion planning, visualization, and localization
- Much more
ROS is the standard for research in robotics and there is a huge, very active community behind it. This also means there are lots of online resources to learn about ROS.
Q: Are we limited to only using ROS libraries and packages since we are using ROS?
A: No. ROS provides packages for many common robotics libraries so that they can be used with ROS easily. In some cases, these libraries even provide nodes that can be executed and used. A great example of this is the ARUCO library and OpenCV. We could install OpenCV as usual, link it with Catkin, and make use of the ARUCO functions in our code. However, the ROS package for ARUCO actually provides a node that subscribes to camera images and outputs detections, which lets the user avoid even writing code.
Q. What does it mean for a program to be a "ROS program"?
A. Typically this would mean that the program is a processes that is connected to the ROS network and registered as a node. This python program can be considered a basic ROS program:
import rospy
def main():
rospy.init_node('hello_world_node')
rate = rospy.Rate(10) # 10hz
while not rospy.is_shutdown():
hello_str = "hello world %s" % rospy.get_time()
print(hello_str)
rate.sleep()
if __name__ == '__main__':
main()
Q. How does the interprocess communication actually work?
A. It is implemented via UDP. There is a ROS master server which is configured by the enviornment variable ROS_MASTER_URI
which by default is set to localhost
. Each device must specify its ROS_IP
and connect to the master server, which knows about the various channels of information and the running nodes across devices.