Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Setting a Pose goal through move_it package

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;
group.setPoseTarget(target_pose1);
group.setRandomTarget();

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.
sleep(5.0);

}

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 tomoveit::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.

Setting a Pose goal through move_it package

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){

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;
 group.setPoseTarget(target_pose1);
 group.setRandomTarget();

 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.
 sleep(5.0);
}

}

However when I compile I get the following error:

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

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

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

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

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

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

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

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

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

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

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

status

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