Skip to content

Commit f766201

Browse files
committed
Add msg, srv, and meshes files
1 parent a8ba990 commit f766201

19 files changed

+315
-2
lines changed

CMakeLists.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
project(zed_interfaces)
3+
4+
# Default to C++14
5+
if(NOT CMAKE_CXX_STANDARD)
6+
set(CMAKE_CXX_STANDARD 14)
7+
endif()
8+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
9+
add_compile_options(-Wall -Wextra -Wpedantic)
10+
endif()
11+
12+
find_package(ament_cmake REQUIRED)
13+
find_package(builtin_interfaces REQUIRED)
14+
find_package(rosidl_default_generators REQUIRED)
15+
find_package(std_msgs REQUIRED)
16+
find_package(geometry_msgs REQUIRED)
17+
18+
###############################################################################
19+
# Add all files in subdirectories of the project in
20+
# a dummy_target so qtcreator have access to all files
21+
FILE(GLOB_RECURSE extra_files ${CMAKE_SOURCE_DIR}/*)
22+
add_custom_target(all_${PROJECT_NAME}_files SOURCES ${extra_files})
23+
###############################################################################
24+
25+
set(MSG_FILES
26+
"msg/Object.msg"
27+
"msg/ObjectsStamped.msg"
28+
"msg/Keypoint2Di.msg"
29+
"msg/Keypoint2Df.msg"
30+
"msg/Keypoint3D.msg"
31+
"msg/BoundingBox2Di.msg"
32+
"msg/BoundingBox2Df.msg"
33+
"msg/BoundingBox3D.msg"
34+
"msg/Skeleton2D.msg"
35+
"msg/Skeleton3D.msg"
36+
)
37+
38+
set(SRV_FILES
39+
"srv/SetPose.srv"
40+
"srv/StartSvoRec.srv"
41+
)
42+
43+
rosidl_generate_interfaces(${PROJECT_NAME}
44+
${MSG_FILES}
45+
${SRV_FILES}
46+
DEPENDENCIES builtin_interfaces std_msgs geometry_msgs
47+
)
48+
49+
# Install URDF files
50+
install(DIRECTORY
51+
meshes
52+
DESTINATION share/${PROJECT_NAME}
53+
)
54+
55+
ament_export_dependencies(rosidl_default_runtime)
56+
ament_package()

README.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,70 @@
1-
# zed-ros2-interfaces
2-
ROS2 interfaces for the ZED ROS2 Wrapper
1+
![](./images/Picto+STEREOLABS_Black.jpg)
2+
3+
# Stereolabs ZED Camera - ROS2 Interfaces
4+
5+
The `zed-ros2-interfaces` repository install the `zed_interfaces` ROS2 package which defines the custom topics, services and actions used by the [ZED ROS2 Wrapper](https://github.com/stereolabs/zed-ros2-wrapper) to interface with ROS2.
6+
7+
If you already installed the [ZED ROS2 Wrapper](https://github.com/stereolabs/zed-ros2-wrapper) or you plan to install it on this machine, this package is not required because it is automatically integrated by `zed-ros2-wrapper` as a git submodule to satisfy all the required dependencies.
8+
9+
You must instead install this package on a remote system that must retrieve the topics sent by the ZED Wrapper (e.g. the list of detected objects obtained with the Object Detection module) or call services and actions to control the status of the ZED Wrapper.
10+
11+
**Note:** this package does not require CUDA, hence it can be used to receive the ZED data also on machines not equipped with an Nvidia GPU.
12+
13+
### Prerequisites
14+
15+
- Ubuntu 20.04
16+
- [ROS2 Foxy](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html)
17+
18+
### Build the repository
19+
20+
The `zed_interfaces` is a colcon package. It depends on the following ROS packages:
21+
22+
- ament_cmake
23+
- builtin_interfaces
24+
- std_msgs
25+
- geometry_msgs
26+
- rosidl_default_generators
27+
- rosidl_default_runtime
28+
- rosidl_interface_packages
29+
30+
Open a terminal, clone the repository, update the dependencies and build the packages:
31+
32+
```
33+
$ cd ~/catkin_ws/src
34+
$ git clone https://github.com/stereolabs/zed-ros2-interfaces.git
35+
$ cd ../
36+
$ rosdep install --from-paths src --ignore-src -r -y
37+
$ colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release
38+
$ echo source $(pwd)/install/local_setup.bash >> ~/.bashrc
39+
$ source ~/.bashrc
40+
```
41+
42+
*Note*: If rosdep is missing you can install it with:
43+
44+
`$ sudo apt-get install python-rosdep python-rosinstall-generator python-vcstool python-rosinstall build-essential`
45+
46+
'Note': The option '--symlink-install' is very important, it allows to use symlinks instead of copying files to the ROS2 folders during the installation, where possible. Each package in ROS2 must be installed and all the files used by the nodes must be copied into the installation folders. Using symlinks allows you to modify them in your workspace, reflecting the modification during the next executions without the needing to issue a new colcon build command. This is true only for all the files that don't need to be compiled (Python scripts, configurations, etc.).
47+
48+
*Note*: If you are using a different console interface like zsh, you have to change the `source` command as follows: `echo source $(pwd)/install/local_setup.zsh >> ~/.zshrc and source ~/.zshrc`.
49+
50+
## Custom Topics
51+
52+
- BoundingBox2Df
53+
- BoundingBox2Di
54+
- BoundingBox3D
55+
- Keypoint2Df
56+
- Keypoint2Di
57+
- Keypoint3D
58+
- Object
59+
- ObjectsStamped
60+
- Skeleton2D
61+
- Skeleton3D
62+
63+
You can get more information reading the [Stereolabs online documentation](https://www.stereolabs.com/docs/ros2/zed-node/)
64+
65+
## Custom Services
66+
67+
- SetPose
68+
- StartSvoRec
69+
70+
You can get more information reading the [Stereolabs online documentation](https://www.stereolabs.com/docs/ros2/zed-node/#services)

meshes/zed.stl

47.5 KB
Binary file not shown.

meshes/zed2.stl

47.5 KB
Binary file not shown.

meshes/zed2i.stl

701 KB
Binary file not shown.

meshes/zedm.stl

73.8 KB
Binary file not shown.

msg/BoundingBox2Df.msg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 0 ------- 1
2+
# | |
3+
# | |
4+
# | |
5+
# 3 ------- 2
6+
zed_interfaces/Keypoint2Df[4] corners

msg/BoundingBox2Di.msg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 0 ------- 1
2+
# | |
3+
# | |
4+
# | |
5+
# 3 ------- 2
6+
zed_interfaces/Keypoint2Di[4] corners

msg/BoundingBox3D.msg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 1 ------- 2
2+
# /. /|
3+
# 0 ------- 3 |
4+
# | . | |
5+
# | 5.......| 6
6+
# |. |/
7+
# 4 ------- 7
8+
zed_interfaces/Keypoint3D[8] corners

msg/Keypoint2Df.msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
float32[2] kp

0 commit comments

Comments
 (0)