-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add and cleanup RobotState doxygen documentation #1846
Conversation
b4be3d6
to
d9312bd
Compare
moveit_core/robot_state/include/moveit/robot_state/robot_state.h
Outdated
Show resolved
Hide resolved
moveit_core/robot_state/include/moveit/robot_state/robot_state.h
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for clarifying the terminology and comments. This at least helped me understand what the functions do / try to achieve.
This seems to be overlapping with #1843 |
Accidentally replaces https://github.com/ros-planning/moveit/pull/1843/files my bad @AndyZe - I've integrated your changes! |
d9312bd
to
368a561
Compare
Please re-review, due to lots of changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 if the requested changes are made.
moveit_core/robot_state/include/moveit/robot_state/robot_state.h
Outdated
Show resolved
Hide resolved
moveit_core/robot_state/include/moveit/robot_state/robot_state.h
Outdated
Show resolved
Hide resolved
@@ -1311,27 +1298,39 @@ as the new values that correspond to the group */ | |||
/** \brief Update the state after setting a particular link to the input global transform pose.*/ | |||
void updateStateWithLinkAt(const LinkModel* link, const Eigen::Isometry3d& transform, bool backward = false); | |||
|
|||
const Eigen::Isometry3d& getGlobalLinkTransform(const std::string& link_name) | |||
{ | |||
return getGlobalLinkTransform(robot_model_->getLinkModel(link_name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you removed the inlining for these 1-liner functions? This (slightly) degrades performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The optimizer decided what gets inlined, modern compilers do not care if its in the header or not (unless its a template)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps insert inline
to force inlining?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline
isn't needed for modern compilers, either. they will choose on their own what to inline or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler cannot inline this function if it's not declared in the header. How should another compilation unit know what to inline? See http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.html#Rf-inline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've added inline to header functions.
@@ -1311,27 +1298,39 @@ as the new values that correspond to the group */ | |||
/** \brief Update the state after setting a particular link to the input global transform pose.*/ | |||
void updateStateWithLinkAt(const LinkModel* link, const Eigen::Isometry3d& transform, bool backward = false); | |||
|
|||
const Eigen::Isometry3d& getGlobalLinkTransform(const std::string& link_name) | |||
{ | |||
return getGlobalLinkTransform(robot_model_->getLinkModel(link_name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps insert inline
to force inlining?
* but also other frame sources (attached objects, subframes). | ||
* | ||
* As opposed to the visual links in |getGlobalLinkTransform|, this function returns | ||
* the collision link transform used for collision checking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This helps explain when to use which one. I find this distinction still a bit confusing. Is this the difference:
- global transform for link: transform for given link in root coordinate frame of robot model
- collision body transform: transform for given collision body in given link's frame
Your high-level description of the transforms returned by the two families methods is the same. I'd reword them a bit to clarify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are worded the same because they behave the same. I don't want to spend any more time on this documentation that no one else has bothered to do in the last 8 years. I need to get actual work done.
Codecov Report
@@ Coverage Diff @@
## master #1846 +/- ##
=========================================
- Coverage 48.46% 48.3% -0.17%
=========================================
Files 298 299 +1
Lines 23305 23401 +96
=========================================
+ Hits 11295 11303 +8
- Misses 12010 12098 +88
Continue to review full report at Codecov.
|
This is ready to be merged. |
I don't agree. I would like to insist on keeping the inlining. |
- ExecutableTrajectory has a new member controller_names_ - PlanExecution includes that list when pushing trajctory parts to the TrajectoryExecutionManager
When reading controller configurations, "default" is ignored as opposed to what is currently written in the documentation. MoveIt{Fake|Simple}ControllerManager now maintains map of controller name and ControllerState where "default" is initialized as "false" or whatever is given in the configuration. MoveIt{Fake|Simple}ControllerManager::getControllerState() now returns the state that is held in that map instead of a default one.
8c08a4b
to
9cfd27a
Compare
Okay, I've restored all the functions to be inline in .h file (without inline tag though, which is how it was originally). |
@jliukkonen asked the difference between getGlobalLinkTransform() and getFrameTransform() so I cleaned up some stuff while verifying my recollection of the difference was correct.