Ask Your Question
0

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

asked 2020-11-21 00:21:21 -0600

Juan gravatar image

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

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
0

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

gvdhoorn gravatar image

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-11-21 00:21:21 -0600

Seen: 16 times

Last updated: Nov 21