Meet Bumperbot
Goal: know what Bumperbot is, and learn two words: node and topic.
The robot
Bumperbot is a small open-source robot designed by Antonio Brandi. It has two motorized wheels and a lidar on top. A lidar is a sensor that measures how far away things are, in every direction around the robot.
Bumperbot from above. The two numbers on the right are how you will tell it how fast to go.
You do not need the real robot. The simulator you just started is a program that pretends to be Bumperbot, inside a small house. Everything you write in this course works the same on the real one.
Try it
- Check that the simulator runs: open the Simulator tab, choose Bumperbot in small house and press Launch. Wait for the status to say it is running.
- In the 3D and data tab, look at the robot and its surroundings.
- Drive it with the pad, or with W A S D. Watch it move in the 3D view.
The pad does nothing?
The pad and W A S D only work while the simulator is running. Launch it first.
Programs and nodes
A robot is not one big program. It is many small programs running at the same time: one drives the wheels, one reads the lidar, one draws the 3D view. In ROS 2, each of these programs is called a node.
- Open a terminal in the editor and run
ros2 node list.
You see the names of the nodes the simulator started. You did not start them yourself.
Topics
Nodes must exchange information: the lidar node must tell the others how far the walls are. They do it through topics. A topic is a named channel. A node puts a message on a topic, and any node can read the messages from it. A message is a small packet of data with named fields.
Three topics are enough to drive Bumperbot. You will use all three in this module.
- Run
ros2 topic list -t. The-tshows the type of message of each topic. - Find
/cmd_vel,/bumperbot_controller/odomand/scanin the list.
Check yourself
What is a node?
One running program, with one job. A robot is made of many nodes.
What is a topic?
A named channel. Nodes put messages on it and read messages from it.
Which topic would your program use to tell Bumperbot how fast to go?
/cmd_vel. In the next step you write the program.
Remember
A robot is many small programs (nodes). They talk through named channels (topics) that carry messages.