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

Fix doxygen documentation for setToIKSolverFrame #2461

Merged
merged 5 commits into from
Dec 17, 2020

Conversation

AndyZe
Copy link
Member

@AndyZe AndyZe commented Dec 16, 2020

I think the documentation here on setToIKSolverFrame() must be wrong. Here's what it says:

bool moveit::core::RobotState::setToIKSolverFrame ( Eigen::Isometry3d& pose, const std::string& ik_frame)

pose - the input to change
ik_frame - the name of frame of reference of base of ik solver

If that were correct, how would we know what the original frame of pose is? I think it should say:

bool moveit::core::RobotState::setToIKSolverFrame | ( Eigen::Isometry3d& pose, const std::string& ik_frame)

pose - the input to change
ik_frame - the **previous** frame of reference of the pose

Fixes #2460

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.

No. Looking into the code, ik_frame indeed refers to the solver's frame, while it is assumed that pose is given w.r.t. the robot model's base frame.

I suggest making this function private (static) within robot_state.cpp. It's only used therein and probably not very useful externally.

@codecov
Copy link

codecov bot commented Dec 16, 2020

Codecov Report

Merging #2461 (64c35eb) into master (253a217) will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2461      +/-   ##
==========================================
- Coverage   60.32%   60.27%   -0.05%     
==========================================
  Files         351      351              
  Lines       26455    26455              
==========================================
- Hits        15957    15943      -14     
- Misses      10498    10512      +14     
Impacted Files Coverage Δ
...bot_state/include/moveit/robot_state/robot_state.h 90.91% <ø> (ø)
moveit_core/robot_model/src/joint_model_group.cpp 62.97% <0.00%> (-2.46%) ⬇️
...e/src/parameterization/model_based_state_space.cpp 70.40% <0.00%> (-2.39%) ⬇️
...meterization/work_space/pose_model_state_space.cpp 83.09% <0.00%> (-1.47%) ⬇️
...nning_scene_monitor/src/planning_scene_monitor.cpp 68.16% <0.00%> (-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 253a217...6b38902. Read the comment docs.

@AndyZe
Copy link
Member Author

AndyZe commented Dec 16, 2020

I suggest making this function private (static) within robot_state.cpp. It's only used therein and probably not very useful externally.

Can't be static because it uses a member variable (robot_model_). Sounds good to me, otherwise

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.

Please make both functions private.

@@ -901,21 +901,13 @@ class RobotState
*/

/**
* \brief Convert the frame of reference of the pose to that same frame as the IK solver expects
* \brief Transform pose from the robot model's base frame to the reference frame of the IK solver
* @param pose - the input to change
* @param solver - a kin solver whose base frame is important to us
* @return true if no error
*/
bool setToIKSolverFrame(Eigen::Isometry3d& pose, const kinematics::KinematicsBaseConstPtr& solver);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make this other function private as well. It could become inline also...

Copy link
Member Author

@AndyZe AndyZe Dec 17, 2020

Choose a reason for hiding this comment

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

You mean, make both function versions inline, right?

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.

One additional change. Otherwise, I approve.

Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>
@AndyZe AndyZe merged commit 97c0b28 into moveit:master Dec 17, 2020
v4hn added a commit to v4hn/moveit that referenced this pull request Apr 6, 2021
This is public API because the solver's getPositionIK requires input poses
in the frame and the relevant transform is otherwise inaccessible.

Partially reverts moveit#2461.
rhaschke pushed a commit that referenced this pull request Apr 6, 2021
This is public API because the solver's getPositionIK requires input poses
in the frame and the relevant transform is otherwise inaccessible.

Partially reverts #2461.
@tylerjw tylerjw mentioned this pull request Apr 9, 2021
tylerjw pushed a commit to tylerjw/moveit that referenced this pull request Apr 29, 2021
* Fix doxygen documentation for setToIKSolverFrame

* "Convert" -> "Transform"

* Make function private. Update comments.

* Make inline and private

* Longer function should not be inline

Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>

Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>
tylerjw pushed a commit to tylerjw/moveit that referenced this pull request Apr 29, 2021
This is public API because the solver's getPositionIK requires input poses
in the frame and the relevant transform is otherwise inaccessible.

Partially reverts moveit#2461.
@tylerjw tylerjw mentioned this pull request Apr 29, 2021
tylerjw pushed a commit to tylerjw/moveit that referenced this pull request May 3, 2021
* Fix doxygen documentation for setToIKSolverFrame

* "Convert" -> "Transform"

* Make function private. Update comments.

* Make inline and private

* Longer function should not be inline

Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>

Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>
tylerjw pushed a commit to tylerjw/moveit that referenced this pull request May 3, 2021
This is public API because the solver's getPositionIK requires input poses
in the frame and the relevant transform is otherwise inaccessible.

Partially reverts moveit#2461.
tylerjw pushed a commit that referenced this pull request May 3, 2021
* Fix doxygen documentation for setToIKSolverFrame

* "Convert" -> "Transform"

* Make function private. Update comments.

* Make inline and private

* Longer function should not be inline

Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>

Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>
tylerjw pushed a commit that referenced this pull request May 3, 2021
This is public API because the solver's getPositionIK requires input poses
in the frame and the relevant transform is otherwise inaccessible.

Partially reverts #2461.
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.

Confusing documentation on setToIKSolverFrame()
2 participants