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

Deprecated error while running "colcon build --mixin release" for moveit2_tutorials in ros2 humble.

asked 2023-07-31 08:18:51 -0500

FailedMesh gravatar image

The error happens in "moveit_task_constructor". It seems the class names are wrong in that particular cpp file. This is the error message:

/home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp: In member function ‘moveit::task_constructor::Task MTCTaskNode::createTask()’:
/home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp:122:43: warning: ‘void moveit::task_constructor::solvers::CartesianPath::setMaxVelocityScaling(double)’ is deprecated: Replace with setMaxVelocityScalingFactor [-Wdeprecated-declarations]
  122 |   cartesian_planner->setMaxVelocityScaling(1.0);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /home/failedmesh/ws_moveit2/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers.h:41,
                 from /home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp:5:
/home/failedmesh/ws_moveit2/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers/cartesian_path.h:60:14: note: declared here
   60 |         void setMaxVelocityScaling(double factor) { setMaxVelocityScalingFactor(factor); }
      |              ^~~~~~~~~~~~~~~~~~~~~
/home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp:123:47: warning: ‘void moveit::task_constructor::solvers::CartesianPath::setMaxAccelerationScaling(double)’ is deprecated: Replace with setMaxAccelerationScalingFactor [-Wdeprecated-declarations]
  123 |   cartesian_planner->setMaxAccelerationScaling(1.0);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /home/failedmesh/ws_moveit2/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers.h:41,
                 from /home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp:5:
/home/failedmesh/ws_moveit2/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers/cartesian_path.h:62:14: note: declared here
   62 |         void setMaxAccelerationScaling(double factor) { setMaxAccelerationScalingFactor(factor); }
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/minimal.cpp: In member function ‘moveit::task_constructor::Task MTCTaskNode::createTask()’:
/home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/minimal.cpp:127:43: warning: ‘void moveit::task_constructor::solvers::CartesianPath::setMaxVelocityScaling(double)’ is deprecated: Replace with setMaxVelocityScalingFactor [-Wdeprecated-declarations]
  127 |   cartesian_planner->setMaxVelocityScaling(1.0);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /home/failedmesh/ws_moveit2/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers.h:41,
                 from /home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/minimal.cpp:5:
/home/failedmesh/ws_moveit2/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers/cartesian_path.h:60:14: note: declared here
   60 |         void setMaxVelocityScaling(double factor) { setMaxVelocityScalingFactor(factor); }
      |              ^~~~~~~~~~~~~~~~~~~~~
/home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/minimal.cpp:128:47: warning: ‘void moveit::task_constructor::solvers::CartesianPath::setMaxAccelerationScaling(double)’ is deprecated: Replace with setMaxAccelerationScalingFactor [-Wdeprecated-declarations]
  128 |   cartesian_planner->setMaxAccelerationScaling(1.0);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /home/failedmesh/ws_moveit2/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers.h:41,
                 from /home/failedmesh/ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/minimal.cpp:5:
/home/failedmesh/ws_moveit2/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers/cartesian_path.h:62:14: note: declared here
   62 |         void setMaxAccelerationScaling(double factor) { setMaxAccelerationScalingFactor(factor); }
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
---
Finished <<< moveit2_tutorials [30.6s]

Summary: 55 packages finished [15min 10s]
  9 packages had stderr output: launch_param_builder moveit2_tutorials moveit_configs_utils moveit_setup_srdf_plugins moveit_task_constructor_capabilities moveit_task_constructor_core moveit_task_constructor_demo moveit_task_constructor_msgs moveit_task_constructor_visualization
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2023-08-01 03:37:10 -0500

sampreets3 gravatar image

Take a look at the particular file in question here: you will see that in the humble branch of the file, there is indeed the following section of code which is deprecated, as is indicated by your error message:

[[deprecated("Replace with setMaxVelocityScalingFactor")]]  // clang-format off
void setMaxVelocityScaling(double factor) { setMaxVelocityScalingFactor(factor); }
[[deprecated("Replace with setMaxAccelerationScalingFactor")]]  // clang-format off
void setMaxAccelerationScaling(double factor) { setMaxAccelerationScalingFactor(factor); }

The simple fix would be to replace the calls to these deprecated functions in your code by the newer functions, namely - setMaxVelocityScalingFactor(factor) and setMaxAccelerationScalingFactor(factor). This should solve the current set of problems you are facing.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-07-31 08:18:51 -0500

Seen: 262 times

Last updated: Aug 01 '23