O'Reilly logo

Robot Operating System Cookbook by Kumar Bipin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works…

Let's do a quick summary of the code to better understand what's going on:

Basically, we have two main files, move_to_waypoint.py and follow_trajectory.py.

The functionality of the move_to_waypoint.py script is to create an action server that is able to convert the waypoints-based trajectory into real movement of the drone. So it handles the actual movement of the drone and publishes the feedback:

class moveAction(object): 

The action server is defined inside a class named moveAction:

def __init__(self, name, real_drone, aruco_mapping): 

The init() function is the constructor of the class. It creates the simple action server, alongside other things that are necessary to move the drone. For instance, it also creates a Publisher ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required