Skip to content

Add lab_sim_behaviors package#518

Open
davetcoleman wants to merge 1 commit intomainfrom
feature/lab-sim-behaviors
Open

Add lab_sim_behaviors package#518
davetcoleman wants to merge 1 commit intomainfrom
feature/lab-sim-behaviors

Conversation

@davetcoleman
Copy link
Member

@davetcoleman davetcoleman commented Feb 25, 2026

Summary

  • New lab_sim_behaviors package providing custom Behavior plugins for lab_sim
  • ComputeTrayPlacePositionsUsingAprilTags: computes grid-based place positions relative to a tray AprilTag for bottle placement workflows
  • Registers the behavior loader plugin in lab_sim config.yaml and adds exec_depend to package.xml
Screenshot 2026-02-25 at 11 09 43 AM

Test plan

  • Build lab_sim_behaviors package in the user workspace
  • Verify the behavior loader plugin is discoverable by the backend
  • Run the "Pick All Bottles with AprilTags" objective that uses ComputeTrayPlacePositionsUsingAprilTags

🤖 Generated with Claude Code

@davetcoleman davetcoleman added this to the 9.1.0 milestone Feb 25, 2026
@davetcoleman davetcoleman marked this pull request as ready for review February 25, 2026 07:26
@davetcoleman davetcoleman requested a review from Copilot February 25, 2026 07:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new lab_sim_behaviors package that provides custom behavior plugins for the lab_sim MoveIt Pro configuration. The package implements a ComputeTrayPlacePositionsUsingAprilTags behavior that computes grid-based placement positions within a tray by detecting its AprilTag marker, and integrates this behavior into the lab_sim configuration.

Changes:

  • New lab_sim_behaviors package with behavior plugin implementation for computing tray place positions using AprilTag detection
  • Integration of the behavior loader plugin into lab_sim's config.yaml and package dependencies
  • Test infrastructure setup (though incomplete)

Reviewed changes

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

Show a summary per file
File Description
src/lab_sim_behaviors/CMakeLists.txt Build configuration for the new behavior package with proper dependency management and plugin export
src/lab_sim_behaviors/package.xml Package metadata with dependencies on MoveIt Pro behavior interfaces and vision libraries
src/lab_sim_behaviors/lab_sim_behaviors_plugin_description.xml Plugin description for pluginlib integration
src/lab_sim_behaviors/include/lab_sim_behaviors/compute_tray_place_positions_using_apriltags.hpp Header defining the behavior class with comprehensive port documentation
src/lab_sim_behaviors/src/compute_tray_place_positions_using_apriltags.cpp Implementation of grid-based placement position computation with AprilTag detection and optional visualization
src/lab_sim_behaviors/src/register_behaviors.cpp Behavior loader implementation for plugin registration
src/lab_sim_behaviors/test/CMakeLists.txt Test configuration (incomplete - only includes find_package)
src/lab_sim/config/config.yaml Added lab_sim_behaviors loader to behavior_loader_plugins
src/lab_sim/package.xml Added exec_depend on lab_sim_behaviors package

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

@rlpratt12
Copy link

This is for https://github.com/PickNikRobotics/moveit_pro/issues/17169 (priority for sprint 133)

@shaur-k shaur-k requested a review from nbbrooks March 4, 2026 16:28
@marioprats
Copy link

There was some discussion about this PR yesterday at standup. Tagging @nbbrooks and @MikeWrock to get their opinions.

To me this is a good pattern that we should be encouraging more. The new Behavior is very specific to the lab_sim config. It makes sense to me it lives in an isolated lab_sim_behaviors package, and only lab_sim depends on it. It also shows users how to create their own config-specific behavior plugins.

And today it's so easy to write custom Behaviors with AI that we shouldn't be afraid of creating one-off high level Behaviors like this, as opposed to solving the same problem with Objectives and Subtrees and low-level Behaviors, which is very often a painful and frustrating experience.

@JWhitleyWork JWhitleyWork force-pushed the feature/lab-sim-behaviors branch from a42cb9a to cb699f5 Compare March 5, 2026 17:56
@JWhitleyWork
Copy link
Member

Rebased to pick up CI fix.

@davetcoleman
Copy link
Member Author

There was some discussion about this PR yesterday at standup. Tagging @nbbrooks and @MikeWrock to get their opinions.

To me this is a good pattern that we should be encouraging more. The new Behavior is very specific to the lab_sim config. It makes sense to me it lives in an isolated lab_sim_behaviors package, and only lab_sim depends on it. It also shows users how to create their own config-specific behavior plugins.

And today it's so easy to write custom Behaviors with AI that we shouldn't be afraid of creating one-off high level Behaviors like this, as opposed to solving the same problem with Objectives and Subtrees and low-level Behaviors, which is very often a painful and frustrating experience.

I 100% agree with this point. And it makes our examples much more interesting and impressive than pick and drop a silly kid's block.

@nbbrooks
Copy link
Member

nbbrooks commented Mar 6, 2026

Yes I also agree. This the guidance we give in https://docs.picknik.ai/how_to/configuration_tutorials/robot_and_objective_inheritance/#moveit-pro-objective-packages - to make a separate package for your domain specific behaviors and objectives. Not to put it in your robot config package (other than open close gripper overrides and the like)

My nit here would be to call this lab_behaviors instead of lab_sim_behaviors, or perhaps lab_objectives or lab_applications if we intend to put both behaviors and objectives in it.

…lTags

- New lab_sim_behaviors package providing custom Behavior plugins for lab_sim
- ComputeTrayPlacePositionsUsingAprilTags: computes grid-based place positions
  relative to a tray AprilTag for bottle placement workflows
- Fix tray center direction and reverse row fill order
- Register the behavior loader plugin in lab_sim config.yaml
- Add lab_sim_behaviors exec_depend to lab_sim package.xml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davetcoleman davetcoleman force-pushed the feature/lab-sim-behaviors branch from cb699f5 to 852a5b9 Compare March 6, 2026 18:58
@davetcoleman
Copy link
Member Author

I think it should share the same name as lab_sim, to make it very clear its a companion behavior to that robot_config. I would very much like to keep lab_sim_behaviors and don't think I'm breaking any standards here

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.

6 participants