C++ for Robotics
Master the basics of C++ for robot programming
Do you want to become a ROS Developer? If the answer is yes, then learning C++ is mandatory for you.
C++ is one of the most popular programming languages for robots, especially when working with industrial or non-educational robots.
In the C++ for Robotics course, you will master essential C++ knowledge in order to get started with ROS smoothly.
You will learn:
- How to compile C++ programs
- How to store data into Variables
- How to operate with the data in the Variables
- How to change behavior based on Conditions
- How to create Functions that can be called from other places in the code
- How to properly use arrays and pointers
- How to encapsulate the code into Classes so you can have clean and robust code
Simulation Robots Used
Basics for Robotics
Physicist | Robotics Engineer
I’m a Physicist and Engineer from Barcelona. I’m passionate about applying
Artificial Intelligence to Robotics, while focusing on the utility and beauty of the fundamental
mathematics and physics involved. ROS gives me the tools to enjoy all of that!
What exercises will you be doing
Create a dictionary that will store the x position of the robot over time.
Conditional Statements and Loops
Create a C++ script that will make the robot move based on a conditional flowchart.
Create a C++ function that will contain a desired trajectory for your robot to follow.
Arrays and Pointers
Analyze the laser beams of your robot using arrays and pointers.
Create a C++ program that makes the robot detect the wall in front of him and change its trajectory to avoid the collision.
Create a C++ program that, using the functions from the rosbot_class.cpp C++ script, helps the Rosbot get out of the cafeteria.
Unit 1: C++ Basics
Learn how to create variables in C++, which types of variables you can create, and how you can operate with those variables. Remember that variables are like storage space for interesting data. We are going to use variables to store sensor data and manipulate it to understand the current situation of the robot. Additionally, you will learn how to add comments to the code.
Unit 2: Conditional Statements and Loops
Learn some more advanced tools that are going to allow you to create more complex and interesting programs. Specifically, you are going to learn about conditional statements and loops.
Unit 3: Functions
Learn some more advanced tools that are going to allow you to create more complex and interesting programs. Specifically, you are going to learn about functions.
Unit 4: Arrays and Pointers
Learn a particular tool of C++: pointers. We are going to present how variables are stored in the memory of the computer, and how we can access this memory with pointers.
Unit 5: C++ classes
Learn how to organize your code properly to prevent messy code when things get complicated (that usually happens when working with robots). The organization method/principle used in C++ is called Object-Oriented Programming and it is based on the concept of C++ classes.
Project: Get out of the cafeteria
Ready to have this ROS skill?
Start learning online quickly and easily