March 2018
Intermediate to advanced
1396 pages
42h 14m
English
The first example that we are going to see is random motion planning using MoveIt! C++ APIs. You will get the code named test_random.cpp from the src folder. The code and the description of each line follows. When we execute this node, it will plan a random path and execute it:
//MoveIt! header file#include <moveit/move_group_interface/move_group.h>int main(int argc, char **argv){ ros::init(argc, argv, "test_random_node", ros::init_options::AnonymousName); // start a ROS spinning thread ros::AsyncSpinner spinner(1); spinner.start(); // this connects to a running instance of the move_group node // Here the Planning group is "arm" move_group_interface::MoveGroup group("arm"); // specify ...