Coder Social home page Coder Social logo

Use c++11 and remove boost dependency about urdfdom HOT 9 CLOSED

ros avatar ros commented on August 19, 2024
Use c++11 and remove boost dependency

from urdfdom.

Comments (9)

scpeters avatar scpeters commented on August 19, 2024 1

boost is gone!

from urdfdom.

scpeters avatar scpeters commented on August 19, 2024

@wjwwood any thoughts?

from urdfdom.

wjwwood avatar wjwwood commented on August 19, 2024

We don't have a plan for migrating to C++11 types within ROS 1, but adding a typedef which doesn't already exist which points to the C++11 types is probably a good strategy. I'm not sure what the sticking points will be in the transition, but if I see a concrete proposal (pull request) I can give feedback on what might be affected based on that.

We already guarantee that ROS 1 will compile when -std=c++11 is passed to the compiler, so we only have to consider the upgrade with respect to types that have changed. We probably won't be able to drop the boost dependency anytime soon. Because we use boost::filesystem and boost::program_options and a few other things which have no C++11 equivalent.

Quickly looking at urdfdom it uses boost::lexical_cast:

#include <boost/lexical_cast.hpp>

Which is probably replaced by std::to_string.

It also uses shared_ptr in the public API:

URDFDOM_DLLAPI boost::shared_ptr<ModelInterface> parseURDF(const std::string &xml_string);

https://github.com/ros/urdfdom_headers/blob/56471a55d85e1be27a91a5f2f72b001d92cddb15/urdf_sensor/include/urdf_sensor/sensor.h#L157
(and others)

And weak_ptr:

https://github.com/ros/urdfdom_headers/blob/56471a55d85e1be27a91a5f2f72b001d92cddb15/urdf_model/include/urdf_model/link.h#L239

from urdfdom.

isucan avatar isucan commented on August 19, 2024

my concern is that there is a lot of code that depends on these types, so I am not too inclined to change this. What do you think of forking to an urdfdom2 that uses c++11 and avoids boost?

from urdfdom.

scpeters avatar scpeters commented on August 19, 2024

Adding c++11 is a huge change, so I had assumed that would involve a major version bump. I had imagined that it could just live in a new branch. Do we need to fork and make a package with a new name (like urdfdom2) for this type of change?

from urdfdom.

scpeters avatar scpeters commented on August 19, 2024

Bump my previous comment: can we make breaking changes in a new release branch (bumping the major version), or does it need to be in a new repository?

from urdfdom.

wjwwood avatar wjwwood commented on August 19, 2024

I'd say do it as a branch, but @isucan should make the call.

from urdfdom.

isucan avatar isucan commented on August 19, 2024

Please do this in a new branch, no need for a new repo.

from urdfdom.

scpeters avatar scpeters commented on August 19, 2024

I just made a pull request to urdfdom_headers to create typedefs for smart pointers. It should preserve backwards compatibility but make it easier to migrate away from boost.

ros/urdfdom_headers#13

from urdfdom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.