Skip to content

Debug print function for RobotTrajectory#715

Merged
henningkayser merged 6 commits intomoveit:mainfrom
DLu:to_string_trajectory
Oct 6, 2021
Merged

Debug print function for RobotTrajectory#715
henningkayser merged 6 commits intomoveit:mainfrom
DLu:to_string_trajectory

Conversation

@DLu
Copy link
Copy Markdown
Contributor

@DLu DLu commented Sep 30, 2021

Signed-off-by: David V. Lu davidvlu@gmail.com

Description

The ability to print a trajectory is useful and should not be limited to the one set of tests.

Checklist

Signed-off-by: David V. Lu <davidvlu@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 30, 2021

Codecov Report

Merging #715 (871ff48) into main (69b59b9) will increase coverage by 0.05%.
The diff coverage is 70.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #715      +/-   ##
==========================================
+ Coverage   54.18%   54.22%   +0.05%     
==========================================
  Files         192      192              
  Lines       20187    20227      +40     
==========================================
+ Hits        10936    10966      +30     
- Misses       9251     9261      +10     
Impacted Files Coverage Δ
...include/moveit/robot_trajectory/robot_trajectory.h 85.72% <ø> (ø)
...eit_core/robot_trajectory/src/robot_trajectory.cpp 23.13% <70.00%> (+7.39%) ⬆️
...bot_state/include/moveit/robot_state/robot_state.h 89.95% <0.00%> (+1.06%) ⬆️

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 69b59b9...871ff48. Read the comment docs.

Copy link
Copy Markdown
Contributor

@v4hn v4hn left a comment

Choose a reason for hiding this comment

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

Great idea! I added a lot of feedback inline.

@DLu
Copy link
Copy Markdown
Contributor Author

DLu commented Sep 30, 2021

Old Output:

trajectory length is 2.96513 seconds.
  Trajectory Points
  waypoint  0 time   0.00 pos   0.00 vel   0.00 acc   0.00 
  waypoint  1 time   0.07 pos   0.00 vel   0.03 acc   1.00 jrk  15.03
  waypoint  2 time   0.67 pos   0.20 vel   0.63 acc   1.00 jrk  -0.00
  waypoint  3 time   0.93 pos   0.40 vel   0.89 acc   1.00 jrk  -0.00
  waypoint  4 time   1.13 pos   0.60 vel   1.03 acc   0.34 jrk  -3.19
  waypoint  5 time   1.32 pos   0.80 vel   1.16 acc   1.00 jrk   3.53
  waypoint  6 time   1.48 pos   1.00 vel   1.24 acc  -0.00 jrk  -6.03
  waypoint  7 time   1.65 pos   1.20 vel   1.16 acc  -1.00 jrk  -6.03
  waypoint  8 time   1.83 pos   1.40 vel   1.03 acc  -0.34 jrk   3.53
  waypoint  9 time   2.04 pos   1.60 vel   0.89 acc  -1.00 jrk  -3.19
  waypoint 10 time   2.30 pos   1.80 vel   0.63 acc  -1.00 jrk  -0.00
  waypoint 11 time   2.90 pos   2.00 vel   0.03 acc  -1.00 jrk  -0.00
  waypoint 12 time   2.97 pos   2.00 vel   0.00 acc  -0.00 jrk  15.03

New Output:

Trajectory has 13 points over 2.97 seconds
  waypoint   0 time  0.00 pos 0.00 vel 0.00 acc 0.00 
  waypoint   1 time  0.07 pos 0.00 vel 0.03 acc 1.00 
  waypoint   2 time  0.67 pos 0.20 vel 0.63 acc 1.00 
  waypoint   3 time  0.93 pos 0.40 vel 0.89 acc 1.00 
  waypoint   4 time  1.13 pos 0.60 vel 1.03 acc 0.34 
  waypoint   5 time  1.32 pos 0.80 vel 1.16 acc 1.00 
  waypoint   6 time  1.48 pos 1.00 vel 1.24 acc -0.00 
  waypoint   7 time  1.65 pos 1.20 vel 1.16 acc -1.00 
  waypoint   8 time  1.83 pos 1.40 vel 1.03 acc -0.34 
  waypoint   9 time  2.04 pos 1.60 vel 0.89 acc -1.00 
  waypoint  10 time  2.30 pos 1.80 vel 0.63 acc -1.00 
  waypoint  11 time  2.90 pos 2.00 vel 0.03 acc -1.00 
  waypoint  12 time  2.97 pos 2.00 vel 0.00 acc -0.00 

Copy link
Copy Markdown
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

Great idea! I definitely like the << overload

@DLu DLu changed the title Add toString(trajectory) to trajectory_tools.h Debug print function for RobotTrajectory Oct 1, 2021
@DLu DLu requested a review from v4hn October 1, 2021 18:57
Copy link
Copy Markdown
Member

@tylerjw tylerjw left a comment

Choose a reason for hiding this comment

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

A couple minor nits, otherwise approve. Thank you for this.


for (size_t p_i = 0; p_i < num_points; p_i++)
{
const moveit::core::RobotState& point = getWayPoint(p_i);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should really finally implement moveit/moveit#1162 ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it started #720

Co-authored-by: Tyler Weaver <tylerjw@gmail.com>
Co-authored-by: Michael Görner <me@v4hn.de>
@DLu DLu force-pushed the to_string_trajectory branch from 97fcabe to 7cd1d7a Compare October 4, 2021 14:44
@DLu DLu requested a review from v4hn October 6, 2021 14:37
Copy link
Copy Markdown
Contributor

@v4hn v4hn left a comment

Choose a reason for hiding this comment

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

great!

@v4hn
Copy link
Copy Markdown
Contributor

v4hn commented Oct 6, 2021

I guess you should rebase to get this merged without admin access.
The repo is setup to require PR branches target the current main branch commit (not my favorite setting, but I didn't decide it).

@henningkayser henningkayser merged commit 7292b9c into moveit:main Oct 6, 2021
@DLu DLu deleted the to_string_trajectory branch October 6, 2021 20:26
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.

4 participants