Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu20.04-catkin_make error #54

Open
linClubs opened this issue Jul 17, 2023 · 2 comments
Open

ubuntu20.04-catkin_make error #54

linClubs opened this issue Jul 17, 2023 · 2 comments

Comments

@linClubs
Copy link

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<teb_local_planner::LineRobotFootprint>]’:
/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
Copy link
Author

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

@daegyun2
Copy link

I'm trying to compile the mpc_local_planner package in ROS Noetic, but I'm encountering a compilation error. I followed the steps mentioned in the repository, and I resolved the first two issues mentioned in the thread (related to dependencies). However, I'm now stuck on this third issue and can't figure out how to proceed.

[ 97%] Building CXX object navigation/move_base/CMakeFiles/move_base.dir/src/move_base.cpp.o /home/jaden/dg_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/jaden/dg_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); | ^~~~~~~~~~~~~ ... /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>( args )... );

What I Tried:
1.Dependencies: I used rosdep to install all required dependencies:
rosdep install --from-paths src --ignore-src -r -y
2. Solver Issue: The SolverIpopt class does not seem to have the required functions like setIterations or setMaxCpuTime. I suspect this might be a version mismatch with the corbo library, but I'm not sure how to verify or fix it.
3. Footprint Issue: The LineRobotFootprint constructor expects different arguments (3 instead of 2, or a geometry_msgs::Point type). I'm not sure how to adapt the code to use this properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants