ComplianceRos error in catkin_make
Hi everyone,
I am trying to make the ComplianceRos but there is an error when I try to use catkin_make.
Does anyone know how to solve this issue?
Below follows the error:
[ 98%] Building CXX object ComplianceRos/custom_controller/CMakeFiles/custom_controller.dir/src/actuator_velocity_controller.cpp.o
/home/hugo/compliant_ws/src/ComplianceRos/custom_controller/src/actuator_position_controller1.cpp: In member function ‘virtual bool custom_controller::ActuatorPositionController1::init(hardware_interface::EffortJointInterface*, ros::NodeHandle&)’:
/home/hugo/compliant_ws/src/ComplianceRos/custom_controller/src/actuator_position_controller1.cpp:146:68: error: no matching function for call to ‘std::vector<boost::shared_ptr<const urdf::Joint> >::push_back(urdf::JointConstSharedPtr)’
joint_urdf_.push_back(urdf.getJoint(joint_name));
^
In file included from /usr/include/c++/7/vector:64:0,
from /opt/ros/melodic/include/ros/forwards.h:32,
from /opt/ros/melodic/include/ros/node_handle.h:31,
from /home/hugo/compliant_ws/src/ComplianceRos/custom_controller/include/custom_controller/actuator_position_controller1.h:62,
from /home/hugo/compliant_ws/src/ComplianceRos/custom_controller/src/actuator_position_controller1.cpp:41:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = boost::shared_ptr<const urdf::Joint>; _Alloc = std::allocator<boost::shared_ptr<const urdf::Joint> >; std::vector<_Tp, _Alloc>::value_type = boost::shared_ptr<const urdf::Joint>]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from ‘urdf::JointConstSharedPtr {aka std::shared_ptr<const urdf::Joint>}’ to ‘const value_type& {aka const boost::shared_ptr<const urdf::Joint>&}’
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = boost::shared_ptr<const urdf::Joint>; _Alloc = std::allocator<boost::shared_ptr<const urdf::Joint> >; std::vector<_Tp, _Alloc>::value_type = boost::shared_ptr<const urdf::Joint>]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from ‘urdf::JointConstSharedPtr {aka std::shared_ptr<const urdf::Joint>}’ to ‘std::vector<boost::shared_ptr<const urdf::Joint> >::value_type&& {aka boost::shared_ptr<const urdf::Joint>&&}’
/home/hugo/compliant_ws/src/ComplianceRos/custom_controller/src/actuator_position_controller_all.cpp: In member function ‘virtual bool custom_controller::ActuatorPositionControllerAll::init(hardware_interface::EffortJointInterface*, ros::NodeHandle&)’:
/home/hugo/compliant_ws/src/ComplianceRos/custom_controller/src/actuator_position_controller_all.cpp:378:53: error: no matching function for call to ‘std::vector<boost::shared_ptr<const urdf::Joint> >::push_back(urdf::JointConstSharedPtr)’
joint_urdf_.push_back(urdf.getJoint(joint_name));
^
In file included from /usr/include/c++/7/vector:64:0,
from /opt/ros/melodic/include/ros/forwards.h:32,
from /opt/ros/melodic/include/ros/node_handle.h:31,
from /home/hugo/compliant_ws/src/ComplianceRos/custom_controller/include/custom_controller /actuator_position_controller_all.h:80,
from /home/hugo/compliant_ws/src/ComplianceRos/custom_controller/src/actuator_position_controller_all.cpp:41:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = boost::shared_ptr<const urdf::Joint>; _Alloc = std::allocator<boost::shared_ptr<const urdf::Joint> >; std::vector<_Tp, _Alloc>::value_type = boost::shared_ptr<const urdf::Joint>]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from ‘urdf::JointConstSharedPtr {aka std::shared_ptr<const urdf::Joint>}’ to ‘const value_type& {aka const boost::shared_ptr<const urdf::Joint>&}’
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void ...
There's a good chance the code you are trying to build targets Kinetic. You appear to be trying to compile it under ROS Melodic. Things like URDF parsers and models have changed.
I'd suggest to ask the maintainers of the code to clarify which ROS version(s) they support.
Please post your last edit as an answer, and accept your own answer.
As-is, your last edit is invisible, and this question looks like it has just been closed without a resolution.
Also: please don't close questions when they have an answer. Answer them. Do not close them "as answered".