February 2018
Beginner
580 pages
13h 20m
English
The first example that we are going to see is a random motion plan 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:
#include <moveit/move_group_interface/move_group_interface.h> int main(int argc, char **argv) { ros::init(argc, argv, "move_group_interface_demo", 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 //move_group_interface::MoveGroup group("arm"); moveit::planning_interface::MoveGroupInterface group("arm"); ...