FREE Course

C++ for Robotics

Master the basics of C++ for robot programming

Course Overview

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

ROSBot 2.0

 

Basics for Robotics

20 hours

Prerequisites

COURSE CREATOR

Irene Pérez
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

[ROS Q&A] 168 - What are the differences between global and local costmap

C++ Basics

Create a dictionary that will store the x position of the robot over time.

[ROS Q&A] 168 - What are the differences between global and local costmap

Conditional Statements and Loops

Create a C++ script that will make the robot move based on a conditional flowchart.

[ROS Q&A] 168 - What are the differences between global and local costmap

Functions

Create a C++ function that will contain a desired trajectory for your robot to follow.

[ROS Q&A] 168 - What are the differences between global and local costmap

Arrays and Pointers

Analyze the laser beams of your robot using arrays and pointers.

[ROS Q&A] 168 - What are the differences between global and local costmap

C++ classes

Create a C++ program that makes the robot detect the wall in front of him and change its trajectory to avoid the collision.

[ROS Q&A] 168 - What are the differences between global and local costmap

Project

Create a C++ program that, using the functions from the rosbot_class.cpp C++ script, helps the Rosbot get out of the cafeteria.

Course Summary

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
Create a C++ program that, using the functions from the rosbot_class.cpp C++ script, helps the Rosbot get out of the cafeteria.

Ready to have this ROS skill?

Start learning online quickly and easily

People interested in this course also viewed

Top universities choose The Construct for Campus to teach ROS & Robotics.

Pin It on Pinterest