mirte_lc_labclean
TODO: Package description
README
Labclean package
Autonomous lab-cleaning application for the Mirte robot, built on py_trees_ros. The package provides a behaviour tree that coordinates exploration, object detection, arm manipulation, and coverage navigation to clean a lab environment without human intervention.
Run
Start the full bringup stack (behaviour tree + Nav2 + MoveIt + perception pipeline):
ros2 launch mirte_lc_labclean labclean_bringup.launch.py use_sim_time:=false
Individual nodes can also be run directly:
ros2 run mirte_lc_labclean labclean_tree
ros2 run mirte_lc_labclean labclean_manager
ros2 run mirte_lc_labclean test_node
Nodes
labclean_tree
The main py_trees_ros behaviour tree. Ticks at 500 ms and drives the full task loop.
Subscribed topics
Topic |
Type |
Description |
|---|---|---|
|
|
Frontier exploration state |
|
|
Cancel button event |
|
|
Start button event |
|
battery msg |
Battery state for low-battery detection |
|
|
3-D (cloud) detections from depth perception pipeline |
Published topics
Topic |
Type |
Description |
|---|---|---|
|
|
LED strip colour |
|
|
LED colour visualisation in RViz |
Action clients
Action server |
Type |
Used by |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Service clients
Service |
Type |
Used by |
|---|---|---|
|
|
|
|
|
|
Blackboard variables
Key |
Type |
Description |
|---|---|---|
|
|
Latest detections from depth camera |
|
|
Count of depth-camera detections |
|
|
Detections from planar perception service |
|
|
Set to |
|
|
Latest exploration state string |
|
event |
Set when cancel is pressed |
|
event |
Set when start is pressed |
|
|
Set by battery monitor when charge is below 25 % |
Behaviour tree structure

Behaviours
FlashLedStrip
Sends a colour command to the Neopixel LED strip via the /io/leds/leds/set_color service and publishes a flat Marker cube above the map origin for RViz visualisation. Always returns SUCCESS after one tick.
behaviours.FlashLedStrip(name="Flash Red", colour=[1.0, 0.0, 0.0])
Note: The hardware LED channel mapping is swapped relative to the message field names (
r→blue,g→red,b→green). The behaviour compensates for this internally.
SetCoverageStatus
Calls /labclean_navigator/set_state to pause, resume, or stop the coverage navigator. Returns RUNNING until the service responds, then SUCCESS or FAILURE.
behaviours.SetCoverageStatus(name="Pause Coverage", requested_status="pause")
# requested_status: "pause" | "resume" | "stop"
MoveArm
Sends a goal to /move_to_position. Accepts a named pose, a blackboard pose, or an explicit (x, y, z) position.
behaviours.MoveArm(name="Deploy Arm", predefined_pose="standby")
behaviours.MoveArm(name="Place", predefined_pose="place_right")
PickObject
Executes a seven-step pick-and-place sequence against the /move_to_position action server:
Step |
Action |
|---|---|
|
Move wrist above closest detected object |
|
Open gripper |
|
Lower wrist to object |
|
Close gripper |
|
Move to |
|
Open gripper |
|
Return arm to vigilant pose |
The closest object is selected by Euclidean distance from base_link. Returns FAILURE if any step is rejected or if no objects are available.
CoverageTask
Sends a coverage goal with planner_type = SKELETON by default to /labclean_navigator/coverage and monitors the action until completion.
GetPlanarObjects
Calls /perception/planar/get_detected_objects and writes results to the blackboard. Returns FAILURE if no objects are detected (used with Retry to poll up to 5×).
Useful CLI commands
# Render the behaviour tree structure as a dot graph
py-trees-render -b mirte_lc_labclean.labclean_tree.create_root
# Watch all blackboard variables live
py-trees-blackboard-watcher --list
# Watch a specific blackboard variable
py-trees-blackboard-watcher /battery.percentage
# Open the graphical tree viewer
py-trees-tree-viewer --no-sandbox
Configuration
File |
Purpose |
|---|---|
|
RViz layout including LED marker, costmaps, and arm displays |
|
OctoMap parameters for the 3-D obstacle layer |
Dependencies
py_trees/py_trees_rosnav2_simple_commander,nav2_msgsmirte_msgs,mirte_lc_msgsexplore_lite_msgstf2_rosvisualization_msgs,geometry_msgs,action_msgs