Skip to content

Commit 07fd3b3

Browse files
committed
Merge branch 'main' into improve_lab_sim_examples
2 parents 651cc2c + 9b7a5f9 commit 07fd3b3

36 files changed

+19906
-36439
lines changed

Dockerfile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ ARG MOVEIT_STUDIO_BASE_IMAGE
1010
ARG USERNAME=studio-user
1111
ARG USER_UID=1000
1212
ARG USER_GID=1000
13+
ARG BASE=base
1314

1415
##################################################
1516
# Starting from the specified MoveIt Pro release #
1617
##################################################
1718
# The image tag is specified in the argument itself.
1819
# hadolint ignore=DL3006
19-
FROM ${MOVEIT_STUDIO_BASE_IMAGE} AS base
20+
FROM ${MOVEIT_STUDIO_BASE_IMAGE} AS base-base
2021

2122
# Create a non-root user
2223
ARG USERNAME
@@ -49,18 +50,20 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
4950
/home/${USERNAME}/.ros && \
5051
chown -R $USER_UID:$USER_GID /home/${USERNAME} /opt/overlay_ws/
5152

52-
# IMPORTANT: Optionally install Nvidia drivers for improved simulator performance with Nvidia GPUs.
53-
# To do this you must
54-
# 1. Uncomment the ENV and RUN entries below
55-
# 2. Replace the 'nvidia-driver-555' apt package with the Nvidia driver version on your host, e.g. nvidia-driver-535, nvidia-driver-555. Use nvidia-smi on your host to determine the driver version.
56-
# After rebuilding via `moveit_pro build` verify the drivers are active in your container by running `nvidia_smi` inside of `moveit_pro shell`.
57-
# ENV DEBIAN_FRONTEND=noninteractive
58-
# RUN apt update && apt install -y software-properties-common
59-
# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
60-
# --mount=type=cache,target=/var/lib/apt,sharing=locked \
61-
# add-apt-repository ppa:graphics-drivers/ppa && \
62-
# apt update && apt upgrade -y && apt install -y nvidia-driver-555
53+
FROM base-base AS base-nvidia
54+
ARG NVIDIA_DRIVER_PACKAGE
55+
ENV DEBIAN_FRONTEND=noninteractive
56+
# hadolint ignore=DL3008
57+
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common
58+
# hadolint ignore=DL3008
59+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
60+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
61+
add-apt-repository ppa:graphics-drivers/ppa && \
62+
apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends "${NVIDIA_DRIVER_PACKAGE}"
6363

64+
ARG BASE
65+
# hadolint ignore=DL3006
66+
FROM base-${BASE} AS base
6467
# Install additional dependencies
6568
# You can also add any necessary apt-get install, pip install, etc. commands at this point.
6669
# NOTE: The /opt/overlay_ws folder contains MoveIt Pro binary packages and the source file.

docker-compose.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Docker Compose file that will be merged with /opt/moveit_pro/docker-compose.yaml.
2+
# For more details on how merging works, see https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/#merging-rules.
3+
4+
# Services that are listed under `/opt/moveit_pro/docker-compose.yaml` are mirrored here for merging.
5+
# Feel free to remove services here that are unmodified.
6+
services:
7+
# The base image that all MoveIt Pro services extend off of. Builds the user workspace.
8+
base:
9+
build:
10+
# List any arguments for building the user workspace here.
11+
args:
12+
# IMPORTANT: Optionally install Nvidia drivers for improved simulator performance with Nvidia GPUs.
13+
# To do this you must
14+
# 1. Uncomment the BASE and NVIDIA_DRIVER_PACKAGE build args below
15+
# 2. Replace the 'nvidia-driver-555' apt package with the Nvidia driver version on your host, e.g. nvidia-driver-535, nvidia-driver-555. Use nvidia-smi on your host to determine the driver version.
16+
# After rebuilding via `moveit_pro build` verify the drivers are active in your container by running `nvidia_smi` inside of `moveit_pro shell`.
17+
# - BASE=nvidia
18+
# - NVIDIA_DRIVER_PACKAGE=nvidia-driver-555
19+
20+
# Starts the MoveIt Pro Agent and the Bridge between the Agent and the Web UI.
21+
agent_bridge:
22+
23+
# Starts the robot drivers.
24+
drivers:
25+
26+
# Starts the web UI frontend.
27+
web_ui:
28+
29+
# Developer specific configuration when running `moveit_pro dev`.
30+
dev:

src/lab_sim/objectives/add_waypoints_to_mtc_task.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
ID="Add Waypoints to MTC Task"
66
_subtreeOnly="true"
77
_description=""
8+
joint_group_name="manipulator"
9+
planner_interface="moveit_default"
10+
mtc_task="{mtc_task}"
811
>
912
<Control ID="Sequence">
1013
<Action
1114
ID="RetrieveWaypoint"
1215
waypoint_joint_state="{target_joint_state}"
13-
waypoint_name="Above Pick Cube"
16+
waypoint_name="Look at Table"
1417
joint_group_name="{joint_group_name}"
1518
/>
1619
<Action
@@ -24,7 +27,7 @@
2427
<Action
2528
ID="RetrieveWaypoint"
2629
waypoint_joint_state="{target_joint_state}"
27-
waypoint_name="Above Place Cube"
30+
waypoint_name="Workspace Right"
2831
joint_group_name="{joint_group_name}"
2932
/>
3033
<Action
@@ -40,10 +43,11 @@
4043
<TreeNodesModel>
4144
<SubTree ID="Add Waypoints to MTC Task">
4245
<input_port name="joint_group_name" default="manipulator" />
43-
<inout_port name="mtc_task" default="{mtc_task}" />
4446
<input_port name="planner_interface" default="moveit_default" />
47+
<inout_port name="mtc_task" default="{mtc_task}" />
4548
<MetadataFields>
4649
<Metadata subcategory="Application - Basic Examples" />
50+
<Metadata runnable="false" />
4751
</MetadataFields>
4852
</SubTree>
4953
</TreeNodesModel>

src/lab_sim/objectives/apriltag_pick_object.xml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
12
<root BTCPP_format="4" main_tree_to_execute="Pick April Tag Labeled Object">
23
<!--//////////-->
34
<BehaviorTree
@@ -21,11 +22,13 @@
2122
ID="GetCameraInfo"
2223
topic_name="/wrist_camera/camera_info"
2324
message_out="{camera_info}"
25+
timeout_sec="5.000000"
2426
/>
2527
<Action
2628
ID="GetImage"
2729
topic_name="/wrist_camera/color"
2830
message_out="{image}"
31+
timeout_sec="5.000000"
2932
/>
3033
<SubTree
3134
ID="Get AprilTag Pose from Image"
@@ -47,7 +50,11 @@
4750
target_pose="{view_pose}"
4851
move_to_pose_solution="{move_to_pose_solution}"
4952
/>
50-
<Action ID="ExecuteMTCTask" solution="{move_to_pose_solution}" />
53+
<Action
54+
ID="ExecuteMTCTask"
55+
solution="{move_to_pose_solution}"
56+
goal_duration_tolerance="-1.000000"
57+
/>
5158
<SubTree
5259
ID="Get AprilTag Pose from Image"
5360
image="{image}"
@@ -66,26 +73,36 @@
6673
<Action
6774
ID="LoadObjectiveParameters"
6875
config_file_name="pick_object_config.yaml"
76+
parameters="{parameters}"
6977
/>
7078
<Action
7179
ID="InitializeMTCTask"
7280
task_id="pick_object"
7381
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
7482
task="{pick_object_task}"
7583
/>
76-
<Action ID="SetupMTCCurrentState" task="{pick_object_task}" />
84+
<Action
85+
ID="SetupMTCCurrentState"
86+
task="{pick_object_task}"
87+
skip_collision_check="false"
88+
/>
7789
<Action
7890
ID="SetupMTCPickObject"
7991
grasp_pose="{offset_pose}"
8092
task="{pick_object_task}"
8193
parameters="{parameters}"
94+
monitored_stage="current state"
8295
/>
8396
<Action
8497
ID="PlanMTCTask"
8598
solution="{pick_object_solution}"
8699
task="{pick_object_task}"
87100
/>
88-
<Action ID="ExecuteMTCTask" solution="{pick_object_solution}" />
101+
<Action
102+
ID="ExecuteMTCTask"
103+
solution="{pick_object_solution}"
104+
goal_duration_tolerance="-1.000000"
105+
/>
89106
</Control>
90107
</BehaviorTree>
91108
<TreeNodesModel>

src/lab_sim/objectives/create_pose_vector.xml

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@
1818
vector="{target_poses}"
1919
input="{stamped_pose}"
2020
/>
21-
<Action
22-
ID="CreateStampedPose"
23-
orientation_xyzw="0;-1;0;0"
24-
position_xyz="0.75;0.5;0.9"
25-
stamped_pose="{stamped_pose}"
26-
/>
27-
<Action
28-
ID="AddPoseStampedToVector"
29-
vector="{target_poses}"
30-
input="{stamped_pose}"
31-
/>
3221
<Action
3322
ID="CreateStampedPose"
3423
orientation_xyzw="0;-1;0;0"
@@ -40,28 +29,6 @@
4029
vector="{target_poses}"
4130
input="{stamped_pose}"
4231
/>
43-
<Action
44-
ID="CreateStampedPose"
45-
orientation_xyzw="0;-1;0;0"
46-
position_xyz="0.25;0.5;0.7"
47-
stamped_pose="{stamped_pose}"
48-
/>
49-
<Action
50-
ID="AddPoseStampedToVector"
51-
vector="{target_poses}"
52-
input="{stamped_pose}"
53-
/>
54-
<Action
55-
ID="CreateStampedPose"
56-
orientation_xyzw="0;-1;0;0"
57-
position_xyz="0;0.5;0.6"
58-
stamped_pose="{stamped_pose}"
59-
/>
60-
<Action
61-
ID="AddPoseStampedToVector"
62-
vector="{target_poses}"
63-
input="{stamped_pose}"
64-
/>
6532
<Action
6633
ID="CreateStampedPose"
6734
orientation_xyzw="0;-1;0;0"
@@ -73,28 +40,6 @@
7340
vector="{target_poses}"
7441
input="{stamped_pose}"
7542
/>
76-
<Action
77-
ID="CreateStampedPose"
78-
orientation_xyzw="0;-1;0;0"
79-
position_xyz="-0.5;0.5;0.8"
80-
stamped_pose="{stamped_pose}"
81-
/>
82-
<Action
83-
ID="AddPoseStampedToVector"
84-
vector="{target_poses}"
85-
input="{stamped_pose}"
86-
/>
87-
<Action
88-
ID="CreateStampedPose"
89-
orientation_xyzw="0;-1;0;0"
90-
position_xyz="-0.75;0.5;0.9"
91-
stamped_pose="{stamped_pose}"
92-
/>
93-
<Action
94-
ID="AddPoseStampedToVector"
95-
vector="{target_poses}"
96-
input="{stamped_pose}"
97-
/>
9843
<Action
9944
ID="CreateStampedPose"
10045
orientation_xyzw="0;-1;0;0"

0 commit comments

Comments
 (0)