moveit / moveit2_tutorials

A sphinx-based centralized documentation repo for MoveIt 2
https://moveit.picknik.ai
BSD 3-Clause "New" or "Revised" License
156 stars 195 forks source link

Warning due to deprecated functions #725

Closed Shobuj-Paul closed 1 year ago

Shobuj-Paul commented 1 year ago

Description

A warning is generated during source build of moveit and moveit_tutorials related to deprecated functions setMaxVelocityScaling and setMaxAccelerationScaling which are to be replaced with setMaxVelocityScalingFactor and setMaxAccelerationScaling respectively.

Your environment

Steps to reproduce

Follow source build instructions on moveit_tutorials

Expected behaviour

Generates a warning about deprecated functions, and asks to replace them with new functions;

Backtrace or Console output

--- stderr: moveit2_tutorials                                  
/home/shobuj/moveit_ws/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/shobuj/moveit_ws/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/shobuj/moveit_ws/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers.h:41,
                 from /home/shobuj/moveit_ws/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp:5:
/home/shobuj/moveit_ws/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/shobuj/moveit_ws/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/shobuj/moveit_ws/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers.h:41,
                 from /home/shobuj/moveit_ws/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp:5:
/home/shobuj/moveit_ws/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/shobuj/moveit_ws/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/shobuj/moveit_ws/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/shobuj/moveit_ws/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers.h:41,
                 from /home/shobuj/moveit_ws/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/minimal.cpp:5:
/home/shobuj/moveit_ws/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/shobuj/moveit_ws/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/shobuj/moveit_ws/install/moveit_task_constructor_core/include/moveit/task_constructor/solvers.h:41,
                 from /home/shobuj/moveit_ws/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/minimal.cpp:5:
/home/shobuj/moveit_ws/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); }
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
FailedMesh commented 1 year ago

Yep, I encountered the same thing while setting it up on humble. Doing this small change works! Thanks for the pull request.