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

urdf::Model , boost::shared_ptr<urdf::Link>, boost::shared_ptr<urdf::Joint>

asked 2020-11-21 00:21:21 -0500

Juan gravatar image

updated 2020-11-21 00:25:53 -0500

Noetic 20.04

Wanting to use the baxter_sim_kinematics package from https://github.com/RethinkRobotics/baxter_simulator

Getting multiple errors on operator assignments and similar stating "no known conversion". One shown below for illustration:

[ 25%] Building CXX object /baxter_simulator/baxter_sim_kinematics/CMakeFiles/baxter_sim_kinematics.dir/src/arm_kinematics.cpp.o

.../baxter_sim_kinematics/src/arm_kinematics.cpp: In member function ‘bool arm_kinematics::Kinematics::readJoints(urdf::Model&)’:

.../baxter_sim_kinematics/src/arm_kinematics.cpp:267:65: error: conversion from ‘urdf::LinkConstSharedPtr’ {aka ‘std::shared_ptr<const urdf::Link>’} to non-scalar type ‘boost::shared_ptr<const urdf::Link>’ requested
  267 |   boost::shared_ptr<const urdf::Link> link = robot_model.getLink(tip_name);
      |                                              ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

I see that this can be fixed if I replace boost:: type pointers by std::. Is this safe?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-11-21 06:01:31 -0500

gvdhoorn gravatar image

updated 2020-11-21 06:06:36 -0500

Yes.

The two smart pointer implementations are semantically compatible.

It seems baxter_sim_kinematics just hasn't been updated to use the implementation available in the std library.


Edit: looks like RethinkRobotics/baxter_simulator#128 is related.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-21 00:21:21 -0500

Seen: 681 times

Last updated: Nov 21 '20