ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Seems like the compiler wants to use the boost:: placeholders instead of the std:: ones despite you using std::bind. You could change _1, ... with std::placeholders::_1, ... or, maybe a little less verbose, use a local using declaration for the correct namespace i.e. using namespace std::placeholders; to import the names for resolution.

Maybe a lambda instead of std::bind altogether if you're using at least C++11, but here I might be wrong.

Seems like the compiler wants to use the boost:: placeholders instead of the std:: ones despite you using std::bind. You could change _1, ... with std::placeholders::_1, ... or, maybe a little less verbose, use a local using declaration for the correct namespace i.e. using namespace std::placeholders; to import the names for resolution.

Maybe a lambda instead of std::bind altogether if If you're using at least C++11, but here I you can avoid bind (boost's or std's) with a lambda:

new_robot_state.setFromIK(joint_model_group,
                          target_pose,
                          ATTEMPTS,
                          TIMEOUT,
                          [/* anything else you might be wrong.

need in your callback */](moveit::core::RobotState* robot_state, const moveit::core::JointModelGroup* joint_group, const double* joint_group_variable_values) { return validateIKSolution(/* anything else you might need in your callback, */ robot_state, joint_group, joint_group_variable_values); });

Seems like the compiler wants to use the boost:: placeholders instead of the std:: ones despite you using std::bind. You could change _1, ... with std::placeholders::_1, ... or, maybe a little less verbose, use a local using declaration for the correct namespace i.e. using namespace std::placeholders; to import the names for resolution.

If you're using at least C++11, you can avoid bind (boost's or std's) with a lambda:

new_robot_state.setFromIK(joint_model_group,
                      new_robot_state.setFromIK(
    joint_model_group,
    target_pose,
     ATTEMPTS,
     TIMEOUT,
     [/* anything else you might need in your callback */](moveit::core::RobotState* robot_state, */](
        moveit::core::RobotState* robot_state,
        const moveit::core::JointModelGroup* joint_group, joint_group,
        const double* joint_group_variable_values)
     {
       return validateIKSolution(/* anything else you might need in your callback, */ robot_state, joint_group, */
                                robot_state,
                                joint_group,
                                joint_group_variable_values);
     });