ros-industrial-consortium / descartes

ROS-Industrial Special Project: Cartesian Path Planner
Apache License 2.0
126 stars 92 forks source link

questions on ptr class reference #199

Closed ghost closed 7 years ago

ghost commented 7 years ago

I wonder if you guys could find class reference for the following?

descartes_core::TrajectoryPtPtr, descartes_core::RobotModelPtr

I found people are using these two functions but I'm not sure where I can find the class reference, I googled it for a long time. I wonder if you could help me with it?

Thank you

BrettHemes commented 7 years ago

They are defined via a macro on line 28 of utils.h https://github.com/ros-industrial-consortium/descartes/blob/44116b74045138a83009a0576457c7a7cc72e05b/descartes_core/include/descartes_core/utils.h#L28

The macro provides a quick way to create types from Boost shared pointers from a provided class... this confused me as well at first. This particular macro is used for PathPlannerBase, RobotModel, and TrajectoryPt. Long story short, you can declare and use them as smart pointers to objects of their respective types ( https://theboostcpplibraries.com/boost.smartpointers-shared-ownership).

Brett

[image: Inline image 1]

On Mon, Jun 26, 2017 at 4:28 PM, Thompson104 notifications@github.com wrote:

I wonder if you guys could find class reference for the following?

descartes_core::TrajectoryPtPtr, specifically there is a "makeCartesianPoint" function descartes_core::RobotModelPtr, specifically there is a "reset" function

I found people are using these two functions but I'm not sure where I can find the class reference, I googled it for a long time. I wonder if you could help me with it?

Thank you

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ros-industrial-consortium/descartes/issues/199, or mute the thread https://github.com/notifications/unsubscribe-auth/AJaIqZK3ZN7UoLEc8gzWyHhOERWd96MNks5sICJ0gaJpZM4OF4PB .

ywen27G commented 7 years ago

@BrettHemes Thank you for your help, this is great.

BrettHemes commented 7 years ago

No problem @mitch1044444 Would you mind closing the issue if you are good on this?

ghost commented 7 years ago

@BrettHemes you are too kind sir.