Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MoveIt Studio message definitions and basic CI #3

Merged
merged 8 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
build_docker:
name: Docker build
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Dockerfile
uses: docker/build-push-action@v3
with:
context: .
push: false
tags: picknikrobotics/moveit-studio-sdk
cache-from: type=gha
cache-to: type=gha,mode=max
25 changes: 15 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
from osrf/ros:humble-desktop-full
FROM osrf/ros:humble-desktop-full

# use cyclone DDS (default is fast DDS)
# hadolint ignore=DL3008
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
ros-humble-rmw-cyclonedds-cpp && \
rm -rf /var/lib/apt/lists/*
ENV RMW_IMPLEMENTATION rmw_cyclonedds_cpp
ENV CYCLONEDDS_URI /root/.ros/cyclonedds.xml
COPY .docker/cyclonedds.xml $CYCLONEDDS_URI
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
adlarkin marked this conversation as resolved.
Show resolved Hide resolved
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends ros-humble-rmw-cyclonedds-cpp

# set up the MoveIt Studio SDK
ENV STUDIO_SDK_WS /opt/moveit_studio_sdk_ws
WORKDIR ${STUDIO_SDK_WS}/src
# TODO(adlarkin) instead of copying individual folders, clone the repo once it's public?
sea-bass marked this conversation as resolved.
Show resolved Hide resolved
COPY moveit_studio_sdk_msgs/ moveit_studio_sdk_msgs/
COPY moveit_studio_msgs/ moveit_studio_msgs/
COPY moveit_studio_py/ moveit_studio_py/
WORKDIR $STUDIO_SDK_WS
RUN apt-get update && apt-get upgrade -y && rosdep install --from-paths src -y --ignore-src && \
rm -rf /var/lib/apt/lists/*
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get upgrade -y && \
rosdep install --from-paths src -y --ignore-src

# hadolint ignore=SC1091
RUN . /opt/ros/humble/setup.sh && colcon build

ENV RMW_IMPLEMENTATION rmw_cyclonedds_cpp
ENV CYCLONEDDS_URI /root/.ros/cyclonedds.xml
COPY .docker/cyclonedds.xml $CYCLONEDDS_URI

# hadolint ignore=SC2016
RUN echo 'source "${STUDIO_SDK_WS}/install/setup.bash"' >> ~/.bashrc

Expand Down
6 changes: 6 additions & 0 deletions moveit_studio_msgs/moveit_studio_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.22)
project(moveit_studio_msgs)

find_package(ament_cmake REQUIRED)

ament_package()
18 changes: 18 additions & 0 deletions moveit_studio_msgs/moveit_studio_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<package format="3">
<name>moveit_studio_msgs</name>
<version>1.0.0</version>
<description>Metapackage for MoveIt Studio message definitions</description>
adlarkin marked this conversation as resolved.
Show resolved Hide resolved
<author email="[email protected]">Joe Schornak</author>
<maintainer email="[email protected]">Joe Schornak</maintainer>

<license>BSD-3-Clause</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>moveit_studio_sdk_msgs</depend>
<depend>moveit_studio_vision_msgs</depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
35 changes: 35 additions & 0 deletions moveit_studio_msgs/moveit_studio_vision_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.22)
project(moveit_studio_vision_msgs)

# Disable Wredundant-decls warnings since rosidl generates redundant function declarations
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wno-redundant-decls)
endif()

find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(shape_msgs REQUIRED)
find_package(std_msgs REQUIRED)

set(msg_files
"msg/GraspableFace.msg"
"msg/GraspableObject.msg"
"msg/ObjectDetection.msg"
"msg/ObjectDetectionArray.msg"
"msg/PointCloudPCD.msg"
)

rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
DEPENDENCIES
builtin_interfaces
geometry_msgs
shape_msgs
std_msgs
)

ament_export_dependencies(rosidl_default_runtime)

ament_package()
10 changes: 10 additions & 0 deletions moveit_studio_msgs/moveit_studio_vision_msgs/msg/GraspableFace.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This message describes a flat region on the surface of an object.

# A polygon which represents a flat surface on an object.
# Only x and y fields of the points are used in the polygon.
# The points in the polygon are ordered counter-clockwise.
geometry_msgs/Polygon vertices

# A pose which orients the polygon relative to an externally-defined frame of reference
# The normal vector of the face points along the Z+ axis.
geometry_msgs/Pose pose
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This message describes a solid rigid object which a robot can grasp.

# The header defines the base frame of the object's pose as well as the object's timestamp.
std_msgs/Header header

# The object's pose relative to the header frame.
# The poses of the surfaces, meshes, and primitives are defined relative to this pose.
geometry_msgs/Pose pose

# The id of the object
string id

# A solid primitive which represents the maximum extent of the object.
# The origin of this primitive is coincident with the object's pose.
shape_msgs/SolidPrimitive bounding_volume

# A vector of surfaces which represents flat faces on the object.
moveit_studio_vision_msgs/GraspableFace[] surfaces

# A vector of solid geometric primitives which describe the shape of the object.
shape_msgs/SolidPrimitive[] primitives
# The size of this vector must be equal to the size of the vector of primitives.
# Each of these poses is relative to the pose defined in the object's `pose` field.
geometry_msgs/Pose[] primitive_poses

# A vector of meshes which describe the shape of the object.
shape_msgs/Mesh[] meshes
# The size of this vector must be equal to the size of the vector of meshes.
# Each of these poses is relative to the pose defined in the object's `pose` field.
geometry_msgs/Pose[] mesh_poses
sea-bass marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Message structure containing a detected object and its pose.

int32 id
string label
geometry_msgs/PoseStamped pose
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Message structure containing an array of detected objects and their poses.

# List of detections
moveit_studio_vision_msgs/ObjectDetection[] detections
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Request identifier
string uuid

# A pointcloud in ASCII PCD format
sea-bass marked this conversation as resolved.
Show resolved Hide resolved
string point_cloud_data
25 changes: 25 additions & 0 deletions moveit_studio_msgs/moveit_studio_vision_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<package format="3">
<name>moveit_studio_vision_msgs</name>
<version>1.0.0</version>
<description>Messages, services and actions used by MoveIt Studio vision capabilities.</description>
<author email="[email protected]">Sebastian Castro</author>
<maintainer email="[email protected]">Sebastian Castro</maintainer>

<license>BSD-3-Clause</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<build_depend>rosidl_default_generators</build_depend>

<depend>geometry_msgs</depend>
sea-bass marked this conversation as resolved.
Show resolved Hide resolved
<depend>shape_msgs</depend>
<depend>std_msgs</depend>

<exec_depend>rosidl_default_runtime</exec_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>