Skip to content

feat(visualization): add TrajectoryToPath behavior#12

Merged
henrygerardmoore merged 3 commits into
mainfrom
feat/trajectory-to-path
May 8, 2026
Merged

feat(visualization): add TrajectoryToPath behavior#12
henrygerardmoore merged 3 commits into
mainfrom
feat/trajectory-to-path

Conversation

@WillYingling

Copy link
Copy Markdown
Contributor

Summary

  • New TrajectoryToPath behavior: converts a trajectory_msgs::msg::JointTrajectory into a vector of PoseStamped by running forward kinematics on a chosen tip link.
  • Output port plugs directly into the existing VisualizePath behavior in MoveIt Pro core, enabling visualization of any joint-space trajectory as a tip-link polyline.
  • A RobotState is hoisted out of the FK loop and PlanningScene::getCurrentState() is documented as the seed source (so joints absent from the trajectory — e.g. the rail or other arm in dual-arm setups — keep their actual current values).

Consumer

Used by autowash_config's new dual-arm path visualization (sibling PR forthcoming on PickNikRoboticsServices/autowash_config) to render planned tip paths for both KUKA arms during MoveToWaypoint and wash-pass execution.

Test plan

  • Build clean from main + this branch.
  • `colcon test --packages-select moveit_pro_experimental_behaviors` passes.
  • Live verification: in autowash_config (with sibling viz PR applied), confirm both arm polylines render in the MoveIt Pro UI during a wash job.

🤖 Generated with Claude Code

WillYingling and others added 2 commits May 5, 2026 15:32
Converts a trajectory_msgs::msg::JointTrajectory into a vector of
PoseStamped via forward kinematics on a chosen tip link, so the existing
VisualizePath behavior can render a joint-space trajectory directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Hoist RobotState out of the FK loop to avoid per-iteration deep copies.
- Document why PlanningScene::getCurrentState() is used rather than URDF defaults.
- Polish the behavior description and clarify the single-stamp policy in doxygen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@WillYingling WillYingling self-assigned this May 5, 2026
Mechanical line-wrap cleanup so the file matches the project's
clang-format config (CI was rejecting the prior formatting).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@WillYingling WillYingling marked this pull request as ready for review May 5, 2026 21:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new TrajectoryToPath BehaviorTree node to convert joint-space trajectories into tip-link Cartesian pose paths (via forward kinematics) so they can be visualized through MoveIt Pro’s existing VisualizePath behavior.

Changes:

  • Introduces TrajectoryToPath behavior implementation and public header.
  • Registers TrajectoryToPath in the plugin loader and adds a plugin-load test instantiation.
  • Updates build/package dependencies for the new behavior (MoveIt Pro base + trajectory messages).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/trajectory_to_path.cpp Implements trajectory-to-pose-path conversion via FK on a selected tip link.
include/experimental_behaviors/trajectory_to_path.hpp Declares the TrajectoryToPath behavior node and its ports/metadata API.
src/register_behaviors.cpp Registers TrajectoryToPath with the behavior factory.
test/test_behavior_plugins.cpp Ensures the new behavior can be instantiated by the BT factory.
CMakeLists.txt Adds the new source file and updates dependency list.
package.xml Declares new runtime/build dependencies for the behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMakeLists.txt
moveit_studio_package()

set(THIS_PACKAGE_INCLUDE_DEPENDS control_msgs geometry_msgs moveit_pro_behavior_interface pluginlib moveit_studio_common behaviortree_cpp tl_expected)
set(THIS_PACKAGE_INCLUDE_DEPENDS control_msgs geometry_msgs moveit_pro_behavior_interface pluginlib moveit_studio_common behaviortree_cpp tl_expected trajectory_msgs moveit_pro_base)
Comment thread package.xml
<depend>pluginlib</depend>
<depend>behaviortree_cpp</depend>
<depend>tl_expected</depend>
<depend>trajectory_msgs</depend>

@henrygerardmoore henrygerardmoore left a comment

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.

Sorry, meant to approve this before

@henrygerardmoore henrygerardmoore merged commit 7b8cad3 into main May 8, 2026
12 checks passed
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.

3 participants