Skip to content

Commit f184eff

Browse files
authored
Merge pull request #429 from PickNikRobotics/v8.8
Merge 8.8 into main
2 parents 6396ee1 + ffb5920 commit f184eff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+235
-191
lines changed

Dockerfile

Lines changed: 2 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ RUN groupadd realtime && \
6767
# hadolint ignore=SC1091
6868
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
6969
--mount=type=cache,target=/var/lib/apt,sharing=locked \
70-
--mount=type=bind,target=${USER_WS}/,source=. \
70+
--mount=type=bind,target=${USER_WS}/src,source=./src \
7171
. /opt/overlay_ws/install/setup.sh && \
7272
apt-get update && \
7373
rosdep install -q -y \
@@ -105,139 +105,11 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
105105
less \
106106
gdb \
107107
nano \
108-
tmux
108+
tmux
109109

110110
# Set up the user's .bashrc file and shell.
111111
CMD ["/usr/bin/bash"]
112112

113-
114-
##################################################
115-
# Starting from the specified MoveIt Pro release with CUDA GPU #
116-
##################################################
117-
# The image tag is specified in the argument itself.
118-
# hadolint ignore=DL3006
119-
FROM ${MOVEIT_STUDIO_BASE_IMAGE} AS base-gpu
120-
121-
# Create a non-root user
122-
ARG USERNAME
123-
ARG USER_UID
124-
ARG USER_GID
125-
126-
# hadolint ignore=DL3008
127-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
128-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
129-
apt-get update && apt-get install wget -y -q --no-install-recommends && \
130-
wget --progress=dot:giga https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb && \
131-
dpkg -i cuda-keyring_1.1-1_all.deb && \
132-
apt-get update && \
133-
apt-get install -q -y --no-install-recommends \
134-
libcudnn9-cuda-12 \
135-
libcudnn9-dev-cuda-12 \
136-
libcublas-12-6 \
137-
cuda-cudart-12-6 \
138-
libcurand-12-6 \
139-
libcufft-12-6 \
140-
libnvinfer10 \
141-
libnvinfer-plugin10 \
142-
libnvonnxparsers10 \
143-
libtree
144-
145-
# Misleading name: onnxruntime_gpu is actually specifically the CUDA package. This is only shipped for x86-64
146-
RUN if [ "$(uname -m)" = "x86_64" ]; then pip3 install --no-cache-dir onnxruntime_gpu==1.19.0; fi
147-
148-
# Copy source code from the workspace's ROS 2 packages to a workspace inside the container
149-
ARG USER_WS=/home/${USERNAME}/user_ws
150-
ENV USER_WS=${USER_WS}
151-
152-
# Also mkdir with user permission directories which will be mounted later to avoid docker creating them as root
153-
WORKDIR $USER_WS
154-
# hadolint ignore=DL3008
155-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
156-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
157-
groupadd --gid $USER_GID ${USERNAME} && \
158-
useradd --uid $USER_UID --gid $USER_GID --shell /bin/bash --create-home ${USERNAME} && \
159-
apt-get update && \
160-
apt-get install -q -y --no-install-recommends sudo && \
161-
echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} && \
162-
chmod 0440 /etc/sudoers.d/${USERNAME} && \
163-
cp -r /etc/skel/. /home/${USERNAME} && \
164-
mkdir -p \
165-
/home/${USERNAME}/.ccache \
166-
/home/${USERNAME}/.config \
167-
/home/${USERNAME}/.ignition \
168-
/home/${USERNAME}/.colcon \
169-
/home/${USERNAME}/.ros && \
170-
chown -R $USER_UID:$USER_GID /home/${USERNAME} /opt/overlay_ws/
171-
172-
# Install additional dependencies
173-
# You can also add any necessary apt-get install, pip install, etc. commands at this point.
174-
# NOTE: The /opt/overlay_ws folder contains MoveIt Pro binary packages and the source file.
175-
# hadolint ignore=SC1091
176-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
177-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
178-
--mount=type=bind,target=${USER_WS}/,source=. \
179-
. /opt/overlay_ws/install/setup.sh && \
180-
apt-get update && \
181-
rosdep install -q -y \
182-
--from-paths src \
183-
--ignore-src
184-
185-
# Set up colcon defaults for the new user
186-
USER ${USERNAME}
187-
RUN colcon mixin add default \
188-
https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml && \
189-
colcon mixin update && \
190-
colcon metadata add default \
191-
https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \
192-
colcon metadata update
193-
COPY colcon-defaults.yaml /home/${USERNAME}/.colcon/defaults.yaml
194-
195-
# hadolint ignore=DL3002
196-
USER root
197-
198-
# Set up the user's .bashrc file and shell.
199-
CMD ["/usr/bin/bash"]
200-
201-
###################################################################
202-
# Target for the developer build which does not compile any code. #
203-
###################################################################
204-
FROM base-gpu AS user-overlay-gpu-dev
205-
206-
ARG USERNAME
207-
ARG USER_WS=/home/${USERNAME}/user_ws
208-
ENV USER_WS=${USER_WS}
209-
210-
# Install any additional packages for development work
211-
# hadolint ignore=DL3008
212-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
213-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
214-
apt-get update && \
215-
apt-get install -y --no-install-recommends \
216-
less \
217-
gdb \
218-
nano
219-
220-
# Set up the user's .bashrc file and shell.
221-
CMD ["/usr/bin/bash"]
222-
223-
#########################################
224-
# Target for compiled, deployable image with GPU support #
225-
#########################################
226-
FROM base-gpu AS user-overlay-gpu
227-
228-
ARG USERNAME
229-
ARG USER_WS=/home/${USERNAME}/user_ws
230-
ENV USER_WS=${USER_WS}
231-
232-
ENV LD_LIBRARY_PATH=/usr/local/lib/python3.10/dist-packages/onnxruntime/capi:/usr/lib/x86_64-linux-gnu:/usr/local/cuda-12.6/targets/x86_64-linux/lib:$LD_LIBRARY_PATH
233-
234-
# Compile the workspace
235-
WORKDIR $USER_WS
236-
237-
# Set up the user's .bashrc file and shell.
238-
CMD ["/usr/bin/bash"]
239-
240-
241113
#########################################
242114
# Target for compiled, deployable image #
243115
#########################################

src/factory_sim/objectives/reachability_analysis_-_blocks.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
_favorite="true"
88
>
99
<Control ID="Sequence" name="">
10+
<Action
11+
ID="LogMessage"
12+
log_level="info"
13+
message="Some of the poses in this objective are unreachable, and planning will fail. A warning with instructions how to continue will appear here"
14+
/>
1015
<Control ID="Sequence" name="Add visualization from scene camera">
1116
<SubTree ID="Clear Snapshot" _collapsed="true" />
1217
<SubTree ID="Take Snapshot" _collapsed="true" />

src/lab_sim/config/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ moveit_params:
3232
pose_jog:
3333
package: "lab_sim"
3434
path: "config/moveit/pose_jog.yaml"
35+
sensors_3d:
36+
package: "lab_sim"
37+
path: "config/moveit/sensors_3d.yaml"
3538

3639
# Configuration for loading behaviors and objectives.
3740
# [Required]

src/lab_sim/config/moveit/sensors_3d.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ scene_scan_camera:
77
# Set to an empty topic to disable.
88
point_cloud_service_name: "/point_cloud_service"
99
# Points further than this will not be used (in meters).
10-
max_range: 1.5
10+
max_range: 6.0
1111
# Choose one of every 'point_subsample' points (select all if set to 1).
1212
point_subsample: 1
1313
# Should always be >= 1.0. Scale up collision shapes in the scene before excluding them from the octomap.
1414
padding_scale: 1.0
1515
# Absolute padding around scaled collision shapes when excluding them from the octomap (in meters).
16-
padding_offset: 0.01
16+
padding_offset: 0.1
1717
# The octomap representation will be updated at rate less than or equal to this value.
1818
max_update_rate: 0.1
1919

2020
# Specifies the resolution at which the octomap is maintained (in meters).
21-
octomap_resolution: 0.01
21+
octomap_resolution: 0.05
2222
# Specifies the coordinate frame in which the Octomap representation will be stored.
2323
# Note! When an OccupancyMonitor instance is initialized by the PlanningSceneMonitor,
2424
# this frame parameter will not be used. Instead, the frame defaults to the planning frame.

src/lab_sim/objectives/_scan_scene.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
joint_group_name="manipulator"
1515
controller_names="joint_trajectory_controller"
1616
waypoint_name="Park Far Right"
17+
acceleration_scale_factor="1.0"
18+
controller_action_server="/joint_trajectory_controller/follow_joint_trajectory"
19+
keep_orientation="false"
20+
keep_orientation_tolerance="0.05"
21+
link_padding="0.01"
22+
seed="0"
23+
velocity_scale_factor="1.0"
1724
/>
1825
<SubTree ID="Take Scene Camera Snapshot" _collapsed="true" />
1926
<SubTree
@@ -22,6 +29,13 @@
2229
joint_group_name="manipulator"
2330
controller_names="joint_trajectory_controller"
2431
waypoint_name="Look at Table"
32+
acceleration_scale_factor="1.0"
33+
controller_action_server="/joint_trajectory_controller/follow_joint_trajectory"
34+
keep_orientation="false"
35+
keep_orientation_tolerance="0.05"
36+
link_padding="0.01"
37+
seed="0"
38+
velocity_scale_factor="1.0"
2539
/>
2640
</Control>
2741
</BehaviorTree>

src/lab_sim/objectives/close_gripper.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
12
<root BTCPP_format="4" main_tree_to_execute="Close Gripper">
23
<BehaviorTree
34
ID="Close Gripper"
45
_description="Close the gripper"
5-
_favorite="true"
6+
_favorite="false"
67
>
78
<Control ID="Sequence" name="root">
89
<Action

src/lab_sim/objectives/grasp_pose_using_yaml.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<BehaviorTree
55
ID="Grasp Pose Using Yaml"
66
_description="Reads a YAML file for grasp pose offset and picks up an object that has an AprilTag marker."
7-
_favorite="true"
7+
_favorite="false"
88
>
99
<Control ID="Sequence" name="TopLevelSequence">
1010
<SubTree ID="Open Gripper" />

src/lab_sim/objectives/joint_diagnostic.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
12
<root BTCPP_format="4" main_tree_to_execute="Joint Diagnostic">
23
<!--//////////-->
34
<BehaviorTree
45
ID="Joint Diagnostic"
56
_description="Example of cycling through the min and max limits of a single joint, for hardware testing"
6-
_favorite="true"
7+
_favorite="false"
78
>
89
<Control ID="Sequence" name="TopLevelSequence">
910
<!--Setup by moving home-->

src/lab_sim/objectives/load_mesh_as_red_pointcloud.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<TreeNodesModel>
3030
<SubTree ID="Load Mesh as Red Point Cloud">
3131
<output_port name="point_cloud" default="{red_cloud}" />
32-
<input_port name="_collapsed" default="false" />
3332
<input_port name="initial_pose" default="{stamped_pose}" />
3433
<MetadataFields>
3534
<Metadata subcategory="Perception - 3D Point Cloud" />

src/lab_sim/objectives/ml_segment_image_from_text_prompt.xml renamed to src/lab_sim/objectives/ml_segment_image.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<root BTCPP_format="4" main_tree_to_execute="ML Segment Image from Text Prompt">
2+
<root BTCPP_format="4" main_tree_to_execute="ML Segment Image">
33
<!--//////////-->
44
<BehaviorTree
5-
ID="ML Segment Image from Text Prompt"
6-
_description="Run an ML model to find all objects and visualize the masks with bounding boxes."
5+
ID="ML Segment Image"
6+
_description="Run an ML model to find all objects and visualize the masks with bounding boxes, from a text prompt."
77
_favorite="true"
88
>
99
<Control ID="Sequence">
@@ -27,7 +27,7 @@
2727
</Control>
2828
</BehaviorTree>
2929
<TreeNodesModel>
30-
<SubTree ID="ML Segment Image from Text Prompt">
30+
<SubTree ID="ML Segment Image">
3131
<MetadataFields>
3232
<Metadata runnable="true" />
3333
<Metadata subcategory="Application - ML (GPU Recommended)" />

0 commit comments

Comments
 (0)