Skip to content

Commit

Permalink
Bugfix ros timestamp noetic (#219)
Browse files Browse the repository at this point in the history
* port fixes
  • Loading branch information
Serafadam authored Feb 6, 2023
1 parent ad187b4 commit 086a8a4
Show file tree
Hide file tree
Showing 19 changed files with 30 additions and 34 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can develop your ROS applications in following ways:
* Use classes provided in `depthai_bridge` to construct your own driver (see `stereo_inertial_node` example on how to do that)
* Use `depthai_ros_driver` class (currently available on ROS2 Humble & Noetic) to get default experience (see details below on how)

![](docs/segmentation.gif)
![](docs/multicam.gif)


Supported ROS versions:
Expand Down Expand Up @@ -145,8 +145,6 @@ Currently, we provide few examples:
* `camera.launch` launches camera in RGBD, and NN in spatial (Mobilenet) mode.
* `rgbd_pcl.launch` launches camera in basic RGBD configuration, doesn't load any NNs. Also loads ROS depth processing nodes for RGBD pointcloud.
* `example_multicam.launch` launches several cameras at once, each one in different container. Edit the `multicam_example.yaml` config file in `config` directory to change parameters

![](docs/multicam.gif)
* `example_segmentation.launch` launches camera in RGBD + semantic segmentation (pipeline type=RGBD, nn_type=rgb)
* `pointcloud.launch` - similar to `rgbd_pcl.launch.py`, but doesn't use RGB component for pointcloud
* `example_marker_publish.launch` launches `camera.launch.py` + small python node that publishes detected objects as markers/tfs
Expand Down
6 changes: 6 additions & 0 deletions depthai-ros/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package depthai-ros
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.6.1 (2023-02-01)
___________
* Fixed timestamp in SpatialDetector
* Updated topic names in stereo_inertial_node

2.6.1 (2023-01-11)
___________
* Update docker image building
Expand Down
2 changes: 1 addition & 1 deletion depthai-ros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.10.2) # CMake version in Ubuntu 18.04 LTS

project(depthai-ros VERSION 2.6.1 LANGUAGES CXX C)
project(depthai-ros VERSION 2.6.2 LANGUAGES CXX C)

set(CMAKE_CXX_STANDARD 14)

Expand Down
2 changes: 1 addition & 1 deletion depthai-ros/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>depthai-ros</name>
<version>2.6.1</version>
<version>2.6.2</version>
<description>The depthai-ros package</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
Expand Down
2 changes: 1 addition & 1 deletion depthai_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 3.10.2) # CMake version in Ubuntu 18.04 LTS
set (CMAKE_POSITION_INDEPENDENT_CODE ON)

project(depthai_bridge VERSION 2.6.1 LANGUAGES CXX C)
project(depthai_bridge VERSION 2.6.2 LANGUAGES CXX C)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
2 changes: 1 addition & 1 deletion depthai_bridge/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>depthai_bridge</name>
<version>2.6.1</version>
<version>2.6.2</version>
<description>The depthai_bridge package</description>

<maintainer email="[email protected]">Sachin Guruswamy</maintainer>
Expand Down
4 changes: 3 additions & 1 deletion depthai_bridge/src/SpatialDetectionConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ namespace dai {
namespace ros {

SpatialDetectionConverter::SpatialDetectionConverter(std::string frameName, int width, int height, bool normalized)
: _frameName(frameName), _width(width), _height(height), _normalized(normalized), _steadyBaseTime(std::chrono::steady_clock::now()) {}
: _frameName(frameName), _width(width), _height(height), _normalized(normalized), _steadyBaseTime(std::chrono::steady_clock::now()) {
_rosBaseTime = ::ros::Time::now();
}

void SpatialDetectionConverter::toRosMsg(std::shared_ptr<dai::SpatialImgDetections> inNetData,
std::deque<SpatialMessages::SpatialDetectionArray>& opDetectionMsgs) {
Expand Down
2 changes: 1 addition & 1 deletion depthai_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10.2) # CMake version in Ubuntu 18.04 LTS
project(depthai_examples VERSION 2.6.1 LANGUAGES CXX C)
project(depthai_examples VERSION 2.6.2 LANGUAGES CXX C)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
18 changes: 9 additions & 9 deletions depthai_examples/launch/stereo_inertial_node.launch
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,24 @@
args="load depth_image_proc/point_cloud_xyzrgb nodelet_manager">
<param name="queue_size" value="10"/>

<remap from="rgb/camera_info" to="/stereo_inertial_publisher/color/camera_info"/>
<remap from="rgb/image_rect_color" to="/stereo_inertial_publisher/color/image"/>
<remap from="depth_registered/image_rect" to="/stereo_inertial_publisher/stereo/image"/>
<remap from="depth_registered/points" to="/stereo_inertial_publisher/stereo/points"/>
<remap from="rgb/camera_info" to="stereo_inertial_publisher/color/camera_info"/>
<remap from="rgb/image_rect_color" to="stereo_inertial_publisher/color/image"/>
<remap from="depth_registered/image_rect" to="stereo_inertial_publisher/stereo/image"/>
<remap from="depth_registered/points" to="stereo_inertial_publisher/stereo/points"/>
</node>

<node if="$(eval arg('depth_aligned') == false)" pkg="nodelet" type="nodelet" name="depth_image_to_pointcloud"
args="load depth_image_proc/point_cloud_xyz nodelet_manager">
<param name="queue_size" value="10"/>
<remap from="camera_info" to="/stereo_inertial_publisher/stereo/camera_info"/>
<remap from="image_rect" to="/stereo_inertial_publisher/stereo/image"/>
<remap from="points" to="/stereo_inertial_publisher/stereo/points"/>
<remap from="camera_info" to="stereo_inertial_publisher/stereo/camera_info"/>
<remap from="image_rect" to="stereo_inertial_publisher/stereo/image"/>
<remap from="points" to="stereo_inertial_publisher/stereo/points"/>
</node>


<node if="$(eval arg('enableMarkerPublish') == true)" type="markerPublisher.py" name="markerPublisher" pkg="depthai_examples">
<remap from="spatialDetections" to="/stereo_inertial_publisher/color/yolov4_Spatial_detections"/>
<remap from="spatialDetectionMarkers" to="/stereo_inertial_publisher/color/spatialDetectionMarkers"/>
<remap from="spatialDetections" to="stereo_inertial_publisher/color/yolov4_Spatial_detections"/>
<remap from="spatialDetectionMarkers" to="stereo_inertial_publisher/color/spatialDetectionMarkers"/>
</node>

<group if="$(eval arg('enableRviz') == true)">
Expand Down
2 changes: 1 addition & 1 deletion depthai_examples/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>depthai_examples</name>
<version>2.6.1</version>
<version>2.6.2</version>
<description>The depthai_examples package</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
Expand Down
2 changes: 1 addition & 1 deletion depthai_ros_driver/cfg/parameters.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ camera.add("stereo_i_decimation_filter_decimation_mode", str_t, 0, "Decimation m
camera.add("stereo_i_depth_filter_size", int_t, 0, "Depth filter size", 5)
camera.add("stereo_i_depth_preset", str_t, 0, "Depth preset", "HIGH_ACCURACY")
camera.add("stereo_i_enable_decimation_filter", bool_t, 0, "Enable decimation filter", False)
camera.add("stereo_i_enable_distoartion_correction", bool_t, 0, "Enable distortion correction", False)
camera.add("stereo_i_enable_distortion_correction", bool_t, 0, "Enable distortion correction", False)
camera.add("stereo_i_enable_spatial_filter", bool_t, 0, "Enable spatial filter", False)
camera.add("stereo_i_enable_temporal_filter", bool_t, 0, "Enable temporal filter", False)
camera.add("stereo_i_enable_threshold_filter", bool_t, 0, "Enable threshold filter", False)
Expand Down
2 changes: 1 addition & 1 deletion depthai_ros_driver/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>depthai_ros_driver</name>
<version>2.6.1</version>
<version>2.6.2</version>
<description>Depthai ROS Monolithic node.</description>
<maintainer email="[email protected]">Adam Serafin</maintainer>
<maintainer email="[email protected]">Sachin Guruswamy</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void StereoParamHandler::declareParams(ros::NodeHandle node, std::shared_ptr<dai
config.postProcessing.thresholdFilter.minRange = getParam<int>(node, "i_threshold_filter_min_range");
config.postProcessing.thresholdFilter.maxRange = getParam<int>(node, "i_threshold_filter_max_range");
}
if(getParam<bool>(node, "i_enable_deciamation_filter")) {
if(getParam<bool>(node, "i_enable_decimation_filter")) {
config.postProcessing.decimationFilter.decimationMode = decimationModeMap.at(getParam<std::string>(node, "i_decimation_filter_decimation_mode"));
config.postProcessing.decimationFilter.decimationFactor = getParam<int>(node, "i_decimation_filter_decimation_factor");
}
Expand Down
2 changes: 1 addition & 1 deletion depthai_ros_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.10.2) # CMake version in Ubuntu 18.04 LTS

project (depthai_ros_msgs VERSION 2.6.1)
project (depthai_ros_msgs VERSION 2.6.2)

if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
Expand Down
2 changes: 1 addition & 1 deletion depthai_ros_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>depthai_ros_msgs</name>
<version>2.6.1</version>
<version>2.6.2</version>
<description>Package to keep interface independent of the driver</description>

<maintainer email="[email protected]">Sachin Guruswamy</maintainer>
Expand Down
Binary file modified docs/multicam.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/param_rgb.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/rtabmap.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions install_dependencies.sh

This file was deleted.

0 comments on commit 086a8a4

Please sign in to comment.