0
$\begingroup$

Rosanswers logo

I'm following the Moveit tutorials, but I can't create the first variable.

I found this link(https://groups.google.com/forum/#!msg/moveit-users/JohDfeDhl6U/ZFfFDsDw7W8J), but I don't understand the answer

Code:

#include <moveit/move_group_interface/move_group.h>
#include <moveit/planning_scene_interface/planning_scene_interface.h>
#include <moveit_msgs/DisplayRobotState.h>
#include <moveit_msgs/DisplayTrajectory.h>
#include <moveit_msgs/AttachedCollisionObject.h>
#include <moveit_msgs/CollisionObject.h>

int main(int argc, char **argv)
{
ros::init(argc, argv, "moveit_test");
ros::NodeHandle node_handle;
ros::AsyncSpinner spinner(1);
spinner.start();

sleep(20.0);

moveit::planning_interface::MoveGroup group("manipulator");

ros::shutdown();
}

Catkin_make:

/home/uplow/cworkspace/moveit/src/moveit_test_programming/src/testi.cpp: In function �int main(int, char**)�:
/home/uplow/cworkspace/moveit/src/moveit_test_programming/src/testi.cpp:17:39: error: no matching function for call to �moveit::planning_interface::MoveGroup::MoveGroup()
/home/uplow/cworkspace/moveit/src/moveit_test_programming/src/testi.cpp:17:39: note: candidates are:
/opt/ros/hydro/include/moveit/move_group_interface/move_group.h:122:3: note: moveit::planning_interface::MoveGroup::MoveGroup(const string&, const boost::shared_ptr<tf::Transformer>&, const ros::Duration&)
/opt/ros/hydro/include/moveit/move_group_interface/move_group.h:122:3: note:   candidate expects 3 arguments, 0 provided
/opt/ros/hydro/include/moveit/move_group_interface/move_group.h:116:3: note: moveit::planning_interface::MoveGroup::MoveGroup(const moveit::planning_interface::MoveGroup::Options&, const boost::shared_ptr<tf::Transformer>&, const ros::Duration&)
/opt/ros/hydro/include/moveit/move_group_interface/move_group.h:116:3: note:   candidate expects 3 arguments, 0 provided
/opt/ros/hydro/include/moveit/move_group_interface/move_group.h:69:7: note: moveit::planning_interface::MoveGroup::MoveGroup(const moveit::planning_interface::MoveGroup&)
/opt/ros/hydro/include/moveit/move_group_interface/move_group.h:69:7: note:   candidate expects 1 argument, 0 provided

Originally posted by Bastbeat on ROS Answers with karma: 131 on 2014-10-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

He says that that class is named differently.

Then substitute the line in your code with:

moveit::planning_interface group("manipulator");

Originally posted by Andromeda with karma: 893 on 2014-11-22

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.