RethinkRobotics / baxter_simulator

Gazebo Simulation interface for the Baxter Research Robot
http://sdk.rethinkrobotics.com/wiki/Baxter_Simulator
BSD 3-Clause "New" or "Revised" License
84 stars 94 forks source link

Build Error on Ubuntu 18.04 with Boost v1.65.1 #128

Open ssnover opened 5 years ago

ssnover commented 5 years ago

Hello,

I'm currently trying to follow the instructions for compiling the baxter_simulator ROS package on this page: http://sdk.rethinkrobotics.com/wiki/Simulator_Installation

After running catkin_make, I get an error during compilation:

[ 94%] Building CXX object baxter_simulator/baxter_sim_io/CMakeFiles/baxter_sim_io.dir/qrc_sim_io.cxx.o
/home/ssnover/catkin_ws/src/baxter_simulator/baxter_sim_kinematics/src/arm_kinematics.cpp: In member function ‘bool arm_kinematics::Kinematics::readJoints(urdf::Model&)’:
/home/ssnover/catkin_ws/src/baxter_simulator/baxter_sim_kinematics/src/arm_kinematics.cpp:248:65: error: conversion from ‘urdf::LinkConstSharedPtr {aka std::shared_ptr<const urdf::Link>}’ to non-scalar type ‘boost::shared_ptr<const urdf::Link>’ requested
   boost::shared_ptr<const urdf::Link> link = robot_model.getLink(tip_name);
                                              ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/ssnover/catkin_ws/src/baxter_simulator/baxter_sim_kinematics/src/arm_kinematics.cpp:255:60: error: no match for ‘operator=’ (operand types are ‘boost::shared_ptr<const urdf::Joint>’ and ‘urdf::JointConstSharedPtr {aka std::shared_ptr<const urdf::Joint>}’)
       joint = robot_model.getJoint(link->parent_joint->name);
                                                            ^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
                 from /opt/ros/melodic/include/ros/forwards.h:37,
                 from /opt/ros/melodic/include/ros/common.h:37,
                 from /opt/ros/melodic/include/ros/ros.h:43,
                 from /home/ssnover/catkin_ws/src/baxter_simulator/baxter_sim_kinematics/src/arm_kinematics.cpp:35:
/usr/include/boost/smart_ptr/shared_ptr.hpp:547:18: note: candidate: boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const boost::shared_ptr<T>&) [with T = const urdf::Joint]
     shared_ptr & operator=( shared_ptr const & r ) BOOST_SP_NOEXCEPT
                  ^~~~~~~~

It appears that one of the dependencies has updated to use modern C++ std::shared_ptr instead of boost::shared_ptr and it broke compilation.

gachiemchiep commented 5 years ago

@ssnover95 use the pull request in https://github.com/RethinkRobotics/baxter_simulator/pull/130 it will fix this error