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

ComplianceRos error in catkin_make

asked 2020-03-03 18:54:47 -0500

Hugo gravatar image

updated 2020-06-19 15:39:16 -0500

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 ...
(more)
edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-04 02:33:20 -0500 )edit

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".

gvdhoorn gravatar image gvdhoorn  ( 2020-06-19 15:31:26 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-06-19 15:40:12 -0500

Hugo gravatar image

updated 2020-06-19 15:44:00 -0500

gvdhoorn gravatar image

I have been in touch with the author (thanks Malgorzata) and solve the question. It was indeed a problem of compilation, but this is the way how she advised me to solve the problem:

"I have been using the package with the ROS Melodic. To compile the package on the ROS Melodic, the following line in some header files in the "custom_controller" package has to be change from

std::vector<boost::shared_ptr<const urdf::Joint> > joint_urdf_;

to

std::vector<std::shared_ptr<const urdf::Joint> > joint_urdf_;

In the package, the following two controllers are the most up-to-date, "actuator_position_controller_classes" and "actuator_velocity_controller". The rest is redundant to these two."

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-03-03 18:54:47 -0500

Seen: 170 times

Last updated: Jun 19 '20