rst-tu-dortmund / mpc_local_planner

The mpc_local_planner package implements a plugin to the base_local_planner of the 2D navigation stack. It provides a generic and versatile model predictive control implementation with minimum-time and quadratic-form receding-horizon configurations.
http://wiki.ros.org/mpc_local_planner
GNU General Public License v3.0
557 stars 143 forks source link

ubuntu20.04-catkin_make error #54

Open linClubs opened 1 year ago

linClubs commented 1 year ago

1 error: ‘using element_type = class corbo::SolverIpopt’ {aka ‘class corbo::SolverIpopt’} has no member named ‘setIterations’ 2 error: ‘using element_type = class corbo::SolverIpopt’ {aka ‘class corbo::SolverIpopt’} has no member named ‘setIpoptOptionString’ 3 error: no matching function for call to ‘teb_local_planner::LineRobotFootprint::LineRobotFootprint(Eigen::Map<const Eigen::Matrix<double, 2, 1>, 0, Eigen::Stride<0, 0> >, Eigen::Map<const Eigen::Matrix<double, 2, 1>, 0, Eigen::Stride<0, 0> >)’

my command show as follow, how do i solve it?

/home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/src/controller.cpp: In member function ‘corbo::NlpSolverInterface::Ptr mpc_local_planner::Controller::configureSolver(const ros::NodeHandle&)’: /home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/src/controller.cpp:393:17: error: ‘using element_type = class corbo::SolverIpopt’ {aka ‘class corbo::SolverIpopt’} has no member named ‘setIterations’ 393 | solver->setIterations(iterations); | ^~~~~ /home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/src/controller.cpp:397:17: error: ‘using element_type = class corbo::SolverIpopt’ {aka ‘class corbo::SolverIpopt’} has no member named ‘setMaxCpuTime’ 397 | solver->setMaxCpuTime(max_cpu_time); | ^~~~~ /home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/src/controller.cpp:404:26: error: ‘using element_type = class corbo::SolverIpopt’ {aka ‘class corbo::SolverIpopt’} has no member named ‘setIpoptOptionNumeric’ 404 | if (!solver->setIpoptOptionNumeric(item.first, item.second)) ROS_WARN_STREAM("Ipopt option " << item.first << " could not be set."); | ^~~~~ /home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/src/controller.cpp:411:26: error: ‘using element_type = class corbo::SolverIpopt’ {aka ‘class corbo::SolverIpopt’} has no member named ‘setIpoptOptionString’ 411 | if (!solver->setIpoptOptionString(item.first, item.second)) ROS_WARN_STREAM("Ipopt option " << item.first << " could not be set."); | ^~~~~~~~ /home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/src/controller.cpp:418:26: error: ‘using element_type = class corbo::SolverIpopt’ {aka ‘class corbo::SolverIpopt’} has no member named ‘setIpoptOptionInt’ 418 | if (!solver->setIpoptOptionInt(item.first, item.second)) ROS_WARN_STREAM("Ipopt option " << item.first << " could not be set."); | ^~~~~ In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14, from /usr/include/boost/make_shared.hpp:14, from /opt/ros/noetic/include/ros/forwards.h:38, from /opt/ros/noetic/include/ros/common.h:37, from /opt/ros/noetic/include/ros/ros.h:43, from /home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/include/mpc_local_planner/mpc_local_planner_ros.h:26, from /home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/src/mpc_local_planner_ros.cpp:23: /usr/include/boost/smart_ptr/make_shared_object.hpp: In instantiation of ‘typename boost::detail::sp_if_not_array::type boost::make_shared(Args&& ...) [with T = teb_local_planner::LineRobotFootprint; Args = {Eigen::Map<const Eigen::Matrix<double, 2, 1, 0, 2, 1>, 0, Eigen::Stride<0, 0> >, Eigen::Map<const Eigen::Matrix<double, 2, 1, 0, 2, 1>, 0, Eigen::Stride<0, 0> >}; typename boost::detail::sp_if_not_array::type = boost::shared_ptr]’: /home/lin/ros_code/nav_ws/src/mpc_local_planner/mpc_local_planner/src/mpc_local_planner_ros.cpp:925:124: required from here /usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: error: no matching function for call to ‘teb_local_planner::LineRobotFootprint::LineRobotFootprint(Eigen::Map<const Eigen::Matrix<double, 2, 1>, 0, Eigen::Stride<0, 0> >, Eigen::Map<const Eigen::Matrix<double, 2, 1>, 0, Eigen::Stride<0, 0> >)’ 256 | ::new( pv ) T( boost::detail::sp_forward( args )... ); | ^~~~~~~~~~~~~~~

linClubs commented 1 year ago

my step as follow:

sudo apt install coinor-libipopt-dev

git clone https://github.com/rst-tu-dortmund/control_box_rst.git -b noetic-devel cd control_box_rst mkdir build cd build && cmake .. && make -j12 && sudo make install

cd catkin_ws/src git clone https://github.com/rst-tu-dortmund/mpc_local_planner.git-b noetic-devel cd .. catkin_make