Skip to content
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

Improves documentation for setJointPositions() #1921

Merged
merged 7 commits into from
Mar 4, 2020

Conversation

ayushgargdroid
Copy link
Contributor

Description

Fixes issue #1908.
setJointPositions method is misleading for some users to believe that they can set positions for multiple joints. setVariablePositions is for that purpose. I have added documentation explaining the same.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@welcome
Copy link

welcome bot commented Mar 2, 2020

Thanks for helping in improving MoveIt and open source robotics!

@codecov-io
Copy link

codecov-io commented Mar 2, 2020

Codecov Report

Merging #1921 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1921      +/-   ##
==========================================
- Coverage   50.28%   50.28%   -0.01%     
==========================================
  Files         313      313              
  Lines       24647    24647              
==========================================
- Hits        12394    12393       -1     
- Misses      12253    12254       +1
Impacted Files Coverage Δ
...bot_state/include/moveit/robot_state/robot_state.h 91.02% <ø> (ø) ⬆️
...nning_scene_monitor/src/planning_scene_monitor.cpp 55.38% <0%> (-0.15%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8a4072...973559b. Read the comment docs.

Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the fact that all functions - although identical - use different comments. Please fix.

@@ -490,33 +490,44 @@ class RobotState
/** \name Getting and setting joint positions, velocities, accelerations and effort
* @{
*/

/** \brief Sets position for 1 joint only. Check setVariablePositions() to set position values to multiple joints. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change all comments to this:

Suggested change
/** \brief Sets position for 1 joint only. Check setVariablePositions() to set position values to multiple joints. */
///@{
/** \brief Set position(s) for a single, potentially multi-dof joint. See setVariablePositions() to handle multiple joints. */

Using doxygen grouping, we can also avoid duplication of the doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Thank you for your feedback.
Also, the setJointPositions/Velocities/Efforts are already grouped in one. Do you want me further break them?
doxygroup

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I didn't notice that there is a general comment for the group already.
In this case, my suggestion is to slightly extend this general comment only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please only modify the single grouping comment at the top. There is no need to repeat the same comment over and over.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better?

Screenshot from 2020-03-02 03-46-11

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The screenshot looks good. However, this isn't yet committed, is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just committed this change now.

Copy link
Contributor

@felixvd felixvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and I learned something about Doxygen.

Only suggested a nitpick because I found the original version easier to read, but I'm fine either way.

@@ -487,49 +487,38 @@ class RobotState

/** @} */

/** \name Getting and setting joint positions, velocities, accelerations and effort
/** \name Getting and setting joint positions, velocities, accelerations and effort for a single, potentially multiple-dof, joint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/** \name Getting and setting joint positions, velocities, accelerations and effort for a single, potentially multiple-dof, joint
/** \name Getting and setting joint positions, velocities, accelerations and effort for a single joint (potentially with more than 1 DOF)

Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Co-Authored-By: Felix von Drigalski <FvDrigalski@gmail.com>
@rhaschke rhaschke merged commit ece0b7b into moveit:master Mar 4, 2020
v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 30, 2020
v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 31, 2020
v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants