Skip to content

Commit

Permalink
Merge pull request #67 from stereolabs/devel_3.6
Browse files Browse the repository at this point in the history
Devel 3.6
  • Loading branch information
Myzhar authored Dec 3, 2021
2 parents 2ae9c3b + 34ad5ab commit 7cbd090
Show file tree
Hide file tree
Showing 30 changed files with 5,042 additions and 5,123 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "zed-ros2-interfaces"]
path = zed-ros2-interfaces
url = [email protected]:stereolabs/zed-ros2-interfaces.git
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $ sudo apt remove ros-foxy-image-transport-plugins ros-foxy-compressed-depth-ima
### Prerequisites

- [Ubuntu 20.04 (Focal Fossa)](https://releases.ubuntu.com/focal/)
- [ZED SDK](https://www.stereolabs.com/developers/release/latest/) v3.5
- [ZED SDK](https://www.stereolabs.com/developers/release/latest/) v3.6
- [CUDA](https://developer.nvidia.com/cuda-downloads) dependency
- ROS2 Foxy Fitxroy:
- [Ubuntu 20.04](https://docs.ros.org/en/foxy/Installation/Linux-Install-Debians.html)
Expand All @@ -63,7 +63,7 @@ To install the **zed_ros2_wrapper**, open a bash terminal, clone the package fro

```bash
$ cd ~/ros2_ws/src/ #use your current ros2 workspace folder
$ git clone https://github.com/stereolabs/zed-ros2-wrapper.git
$ git clone --recursive https://github.com/stereolabs/zed-ros2-wrapper.git
$ cd ..
$ rosdep install --from-paths src --ignore-src -r -y
$ colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release
Expand All @@ -79,6 +79,21 @@ $ source ~/.bashrc

**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`.

#### Update the local repository

To update the repository to the latest release you must use the following command to retrieve the latest commits of `zed-ros2-wrapper` and of all the submodules:

$ git checkout master # if you are not on the main branch
$ git pull --recurse-submodules # update recursively all the submodules

Remember to always clean the cache of your colcon workspace before compiling with the `colcon build` command to be sure that everything will work as expected:

$ cd <catkin_workspace_root>
$ rm -rf install
$ rm -rf build
$ rm -rf log
$ colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release

## Starting the ZED node

To start the ZED node, open a terminal and use the [CLI](https://index.ros.org/doc/ros2/Tutorials/Introspection-with-command-line-tools/) command `ros2 launch`:
Expand Down
25 changes: 5 additions & 20 deletions last_changes.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
LATEST CHANGES
==============

2021-12-01
----------
v3.6.x (2021-12-03)
-------------------
- Moved the `zed_interfaces` package to the `zed-ros2-interfaces` repository to match the same configuration of the ROS1 wrapper
- The `zed-ros2-interfaces` repository has been added as a sub-module to this repository
- Add new <zed>_base_link frame on the base of the camera to easily handle camera positioning on robots. Thx @civerachb-cpr
- Improve URDF by adding 3° slope for ZED and ZED2, X-offset for optical frames to correctly match the CMOS sensors position on the PCB, X-offset for mounting screw on ZED2i
- Add `zed_macro.urdf.xacro` to be included by other xacro file to easily integrate ZED cameras in the robot descriptions. See ROS1 PR [#771](https://github.com/stereolabs/zed-ros-wrapper/pull/771) for details. Thx @civerachb-cpr

2021-11-16
----------
- Fix URDF `height` value for ZED, ZED2 and ZED2i
- Fix performances drop on slower platforms. Thx @roncapat

2021-08-06
----------
- Fix SVO LOOP wrong behavior. Thx @kevinanschau

2021-07-21
----------
- Add xacro support for automatic URDF configuration
- Reworked launch files to support xacro and launch parameters
- Use `ros2 launch zed_wrapper <launch_file> -s` to retrieve all the available parameters
- Add `svo_path:=<full path to SVO file>` as input for all the launch files to start the node using an SVO as input without modifying 'common.yaml`

2021-07-15
----------
- Improved diagnostic information adding elaboration time on all the main tasks
- Improved diagnostic time and frequencies calculation
- Added StopWatch to sl_tools

2021-07-14
----------
- Enabled Diagnostic status publishing
- Changed the default values of the QoS parameter reliability for all topics from BEST_EFFORT to RELIABLE to guarantee compatibility with all ROS2 tools

2021-07-12
----------
- Fixed tab error in `zedm.yaml`
- Fixed compatibility issue with ZED SDK older than v3.5 - Thanks @PhilippPolterauer
- Migration to ROS2 Foxy Fitzroy
Expand Down
1 change: 1 addition & 0 deletions zed-ros2-interfaces
Submodule zed-ros2-interfaces added at 5fab23
5 changes: 5 additions & 0 deletions zed_components/src/tools/include/sl_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ rclcpp::Time slTime2Ros(sl::Timestamp t, rcl_clock_type_t clock_type = RCL_ROS_T
*/
bool isZED2OrZED2i(sl::MODEL camModel);

/*! \brief check if Object Detection is available
* \param camModel the camera model to check
*/
bool isObjDetAvailable(sl::MODEL camModel);

/*! \brief sl::Mat to ros message conversion
* \param img : the image to publish
* \param frameId : the id of the reference frame of the image
Expand Down
18 changes: 18 additions & 0 deletions zed_components/src/tools/src/sl_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,24 @@ bool isZED2OrZED2i(sl::MODEL camModel){
return false;
}

bool isObjDetAvailable(sl::MODEL camModel)
{
if (camModel == sl::MODEL::ZED2) {
return true;
}
#if ZED_SDK_MAJOR_VERSION == 3 && ZED_SDK_MINOR_VERSION >= 5
if (camModel == sl::MODEL::ZED2i) {
return true;
}
#endif
#if ZED_SDK_MAJOR_VERSION == 3 && ZED_SDK_MINOR_VERSION >= 6
if (camModel == sl::MODEL::ZED_M) {
return true;
}
#endif
return false;
}

StopWatch::StopWatch()
{
tic(); // Start the timer at creation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ class ZedCamera : public rclcpp::Node
bool mObjDetAnimalsEnable = true;
bool mObjDetElectronicsEnable = true;
bool mObjDetFruitsEnable = true;
bool mBodyFitting = false;
bool mObjDetBodyFitting = false;
sl::BODY_FORMAT mObjDetBodyFmt = sl::BODY_FORMAT::POSE_34;
sl::DETECTION_MODEL mObjDetModel = sl::DETECTION_MODEL::HUMAN_BODY_FAST;
// QoS parameters
// https://github.com/ros2/ros2/wiki/About-Quality-of-Service-Settings
Expand Down
Loading

0 comments on commit 7cbd090

Please sign in to comment.