moveit / moveit_tutorials

A sphinx-based centralized documentation repo for MoveIt
https://moveit.github.io/moveit_tutorials/
BSD 3-Clause "New" or "Revised" License
479 stars 695 forks source link

Compiling the noetic version according to the official docs reports errors #827

Closed lblbk closed 1 month ago

lblbk commented 1 month ago

Description

according the official docs download-example-code

Your environment

Steps to reproduce

nothing todo, just according the docs well reports errors

Backtrace or Console output

move_group_interface_tutorial.cpp: In function ‘int main(int, char**)’:
/home/wibot/Work/robot/ws_moveit/src/moveit_tutorials/doc/move_group_interface/src/move_group_interface_tutorial.cpp:305:94: error: no matching function for call to ‘moveit::planning_interface::MoveGroupInterface::computeCartesianPath(std::vector<geometry_msgs::Pose_<std::allocator<void> > >&, const double&, moveit_msgs::RobotTrajectory&)’
  305 |   double fraction = move_group_interface.computeCartesianPath(waypoints, eef_step, trajectory);
      |                                                                                              ^
In file included from /home/wibot/Work/robot/ws_moveit/src/moveit_tutorials/doc/move_group_interface/src/move_group_interface_tutorial.cpp:37:
/opt/ros/noetic/include/moveit/move_group_interface/move_group_interface.h:782:10: note: candidate: ‘double moveit::planning_interface::MoveGroupInterface::computeCartesianPath(const std::vector<geometry_msgs::Pose_<std::allocator<void> > >&, double, double, moveit_msgs::RobotTrajectory&, bool, moveit_msgs::MoveItErrorCodes*)’
  782 |   double computeCartesianPath(const std::vector<geometry_msgs::Pose>& waypoints, double eef_step, double jump_threshold,
      |          ^~~~~~~~~~~~~~~~~~~~
/opt/ros/noetic/include/moveit/move_group_interface/move_group_interface.h:782:10: note:   candidate expects 6 arguments, 3 provided

solution

function computeCartesianPath have 4 arguments in the moledic-devel branch L281, but only 3 arguments in the default branch

  const double jump_threshold = 0.0;
  const double eef_step = 0.01;
  double fraction = move_group_interface.computeCartesianPath(waypoints, eef_step, jump_threshold, trajectory);

Just copy the code from the melodic version

rhaschke commented 1 month ago

If you are building against MoveIt source, you will need the 3-arguments version. Probably you are building against the binary release.

lblbk commented 1 month ago

If you are building against MoveIt source, you will need the 3-arguments version. Probably you are building against the binary release.

I am following the tutorial step by step. getting_started.html

rhaschke commented 1 month ago

The tutorial suggests building MoveIt from source. This should work w/o errors. Your compiler picks up MoveIt sources from /opt/ros/noetic instead.