ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Setting a Pose goal through move_it package

asked 2015-07-31 09:50:11 -0500

p_mukherjee gravatar image

updated 2015-07-31 10:33:00 -0500

gvdhoorn gravatar image

Hello everyone,

I am using move_it package as a motion planner for quadrotor package. I am trying to set setPoseTarget using the C++ move group interface. Below is the code that I wrote ( by referring to the move it tutorial on their website).

void Quad::moveit_waypoints(double s_x,double s_y,double s_z,double g_x,double g_y,double g_z){

    moveit::planning_interface::MoveGroup group("virtt");
    moveit::planning_interface::PlanningSceneInterface planning_scene_interface;
    //ros::Publisher display_publisher = node_handle.advertise<moveit_msgs::DisplayTrajectory>("/move_group/display_planned_path", 1, true);
    //moveit_msgs::DisplayTrajectory display_trajectory;
    ROS_INFO("Reference frame: %s", group.getPlanningFrame().c_str());
    //ROS_INFO("Reference frame: %s", base.getEndEffectorLink().c_str());
    geometry_msgs::Pose target_pose1;
    target_pose1.orientation.w = 1.0;
    target_pose1.position.x = 0.28;
    target_pose1.position.y = -0.7;
    target_pose1.position.z = 1.0;

    moveit::planning_interface::MoveGroup::Plan my_plan;
    bool success = group.plan(my_plan);
    ROS_INFO("Visualizing plan 1 (pose goal) %s",success?"":"FAILED");
    // Sleep to give Rviz time to visualize the plan.

However when I compile I get the following error:

In function `Quad::moveit_waypoints(double, double, double, double, double, double)':
quadrotor.cpp:(.text+0x3147): undefined reference to `moveit::planning_interface::MoveGroup::MoveGroup(std::string const&, boost::shared_ptr<tf::Transformer> const&, ros::Duration const&)'

quadrotor.cpp:(.text+0x3192): undefined reference to `moveit::planning_interface::PlanningSceneInterface::PlanningSceneInterface()'

quadrotor.cpp:(.text+0x3271): undefined reference to `moveit::planning_interface::MoveGroup::getPlanningFrame() const'

quadrotor.cpp:(.text+0x3315): undefined reference to `moveit::planning_interface::MoveGroup::setRandomTarget()'

quadrotor.cpp:(.text+0x333d): undefined reference to `moveit::planning_interface::MoveGroup::plan(moveit::planning_interface::MoveGroup::Plan&)'

quadrotor.cpp:(.text+0x349f): undefined reference to `moveit::planning_interface::PlanningSceneInterface::~PlanningSceneInterface()'

quadrotor.cpp:(.text+0x34ae): undefined reference to `moveit::planning_interface::MoveGroup::~MoveGroup()'

quadrotor.cpp:(.text+0x34d9): undefined reference to `moveit::planning_interface::MoveGroup::~MoveGroup()'

quadrotor.cpp:(.text+0x3510): undefined reference to `moveit::planning_interface::MoveGroup::~MoveGroup()'

quadrotor.cpp:(.text+0x35a5): undefined reference to `moveit::planning_interface::PlanningSceneInterface::~PlanningSceneInterface()'

quadrotor.cpp:(.text+0x35b9): undefined reference to `moveit::planning_interface::MoveGroup::~MoveGroup()'
collect2: error: ld returned 1 exit status

Could anyone shed some light on this? Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-07-31 10:31:52 -0500

dornhege gravatar image

You are not linking moveit. You are probably missing a dependency or link call in your cmake files.

edit flag offensive delete link more


Thank You!! Yes I missed the configurations in CMakeList and package.xml

p_mukherjee gravatar image p_mukherjee  ( 2015-08-04 03:08:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-07-31 09:50:11 -0500

Seen: 641 times

Last updated: Jul 31 '15