mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-09-16 08:10:19 +08:00
Lyrical support (#1433)
* Lyrical support * removed dep not available on lyrical * updated docker lyrcical * making cmake less verbose, disabled tests on rtabmap_python * cleanup not used tests in rtabmap_python * addressing some lyrical deprecated warnings * cancel pr jobs on recommit * small refactor * disabled lyrical bin docker * restored python test and fixed error * trigger ci * fixing docker lyrical * disabled rtabmap_ros lyrical * pytest * fixing packages-skip * bump 0.23.7
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
|
||||
FROM introlab3it/rtabmap:resolute
|
||||
|
||||
# remove ubuntu user
|
||||
RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu
|
||||
|
||||
ARG USERNAME=vscode
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=1000
|
||||
|
||||
RUN set -ex && \
|
||||
groupadd --gid ${USER_GID} ${USERNAME} && \
|
||||
useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} && \
|
||||
usermod -a -G sudo ${USERNAME} && \
|
||||
echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USERNAME} && \
|
||||
chmod 0440 /etc/sudoers.d/${USERNAME}
|
||||
|
||||
RUN mkdir -p /home/${USERNAME}/ros2_ws/src && \
|
||||
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/ros2_ws
|
||||
|
||||
RUN echo "source /opt/ros/lyrical/setup.bash" >> /home/${USERNAME}/.bashrc
|
||||
RUN echo "source /usr/share/bash-completion/completions/git" >> /home/${USERNAME}/.bashrc
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"pull": true
|
||||
},
|
||||
"remoteUser": "vscode",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-vscode.cpptools-themes",
|
||||
"ms-vscode.cmake-tools",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"ms-python.python"]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"python.autoComplete.extraPaths": [
|
||||
"/opt/ros/kilted/lib/python3/dist-packages"
|
||||
],
|
||||
"terminal.integrated.defaultProfile.linux": "bash"
|
||||
},
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/ros2_ws/src/rtabmap_ros,type=bind",
|
||||
"workspaceFolder": "/home/vscode/ros2_ws",
|
||||
"postCreateCommand": "sudo rosdep init && rosdep update && sudo apt update && rosdep install --from-paths ~/ros2_ws/src/rtabmap_ros -i --skip-keys=\"rtabmap nav2_msgs grid_map_ros nav2_costmap_2d nav2_bringup realsense2_camera velodyne\" -y && echo 'Initialize: export MAKEFLAGS=\"-j6\" && colcon build --cmake-args -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release --parallel-workers 2'",
|
||||
"hostRequirements": {
|
||||
"gpu": "optional"
|
||||
},
|
||||
"runArgs": ["--privileged",
|
||||
"--network=host",
|
||||
"--gpus=all",
|
||||
//"--runtime=nvidia", // uncommment this if rtabmap doesn't show up in nvidia-smi on the host computer
|
||||
"--env=DISPLAY",
|
||||
"--env=QT_X11_NO_MITSHM=1",
|
||||
"--volume=/tmp/.X11-unix:/tmp/.X11-unix"],
|
||||
"containerEnv": {
|
||||
"NVIDIA_VISIBLE_DEVICES": "all"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
FROM ubuntu:24.04
|
||||
FROM ubuntu:26.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
@@ -2,8 +2,13 @@ name: docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'ros2'
|
||||
branches: [ ros2 ]
|
||||
pull_request:
|
||||
branches: [ ros2 ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
@@ -12,7 +17,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
docker_tag: [humble, humble-latest, jazzy, jazzy-latest, kilted-latest]
|
||||
docker_tag: [humble, humble-latest, jazzy, jazzy-latest, kilted, kilted-latest, lyrical-latest]
|
||||
include:
|
||||
- docker_tag: humble
|
||||
docker_path: 'humble'
|
||||
@@ -33,8 +38,23 @@ jobs:
|
||||
docker_platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
- docker_tag: kilted
|
||||
docker_path: 'kilted'
|
||||
docker_platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
- docker_tag: kilted-latest
|
||||
docker_path: 'kilted/latest'
|
||||
docker_platforms: |
|
||||
linux/amd64
|
||||
#Disabled till rtabmap_ros is released on lyrical
|
||||
#- docker_tag: lyrical
|
||||
# docker_path: 'lyrical'
|
||||
# docker_platforms: |
|
||||
# linux/amd64
|
||||
# linux/arm64
|
||||
- docker_tag: lyrical-latest
|
||||
docker_path: 'lyrical/latest'
|
||||
docker_platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
@@ -53,6 +73,9 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Login to DockerHub
|
||||
# Only needed when pushing; skipped on pull requests (secrets are
|
||||
# unavailable for fork PRs and we don't push there anyway).
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
@@ -62,8 +85,8 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: ${{ matrix.docker_platforms }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || matrix.docker_platforms }}
|
||||
file: ./docker/${{ matrix.docker_path }}/Dockerfile
|
||||
tags: introlab3it/rtabmap_ros:${{ matrix.docker_tag }}
|
||||
no-cache: true
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ros_distro: [humble, jazzy, kilted, rolling]
|
||||
ros_distro: [humble, jazzy, kilted, lyrical, rolling]
|
||||
include:
|
||||
- ros_distro: humble
|
||||
skip_keys: ''
|
||||
@@ -31,10 +31,10 @@ jobs:
|
||||
- ros_distro: kilted
|
||||
skip_keys: 'grid_map_ros'
|
||||
packages: 'rtabmap_ros'
|
||||
#- ros_distro: lyrical
|
||||
# skip_keys: 'nav2_bringup nav2_msgs velodyne'
|
||||
# # rtabmap_costmap_plugins cannot be built, missing nav2 on lyrical, build other packages:
|
||||
# packages: 'rtabmap_launch rtabmap_demos rtabmap_python rtabmap_examples rtabmap_rviz_plugins'
|
||||
- ros_distro: lyrical
|
||||
skip_keys: 'nav2_bringup nav2_msgs velodyne grid_map_ros realsense2_camera libpointmatcher'
|
||||
# rtabmap_costmap_plugins cannot be built, missing nav2 on lyrical, build other packages:
|
||||
packages: 'rtabmap_launch rtabmap_demos rtabmap_python rtabmap_examples rtabmap_rviz_plugins'
|
||||
- ros_distro: rolling
|
||||
skip_keys: 'nav2_bringup nav2_msgs velodyne'
|
||||
# rtabmap_costmap_plugins cannot be built, missing nav2 on rolling, build other packages:
|
||||
|
||||
@@ -12,6 +12,6 @@ RUN source /ros_entrypoint.sh && \
|
||||
apt-get update && \
|
||||
rosdep install --from-paths src --ignore-src -r -y -t build_export -t test -t build -t buildtool_export -t buildtool --skip-keys="rtabmap" && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/ && \
|
||||
colcon build --executor sequential --event-handlers console_direct+ --install-base /opt/ros/humble --merge-install --cmake-args --debug-find -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release && \
|
||||
colcon build --executor sequential --event-handlers console_direct+ --install-base /opt/ros/humble --merge-install --cmake-args -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release && \
|
||||
cd && \
|
||||
rm -rf ros2_ws
|
||||
|
||||
@@ -14,6 +14,6 @@ RUN source /ros_entrypoint.sh && \
|
||||
apt-get update && \
|
||||
rosdep install --from-paths src --ignore-src -r -y -t build_export -t test -t build -t buildtool_export -t buildtool --skip-keys="rtabmap grid_map_ros" && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/ && \
|
||||
colcon build --event-handlers console_direct+ --install-base /opt/ros/$ROS_DISTRO --merge-install --cmake-args --debug-find -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release && \
|
||||
colcon build --event-handlers console_direct+ --install-base /opt/ros/$ROS_DISTRO --merge-install --cmake-args -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release && \
|
||||
cd && \
|
||||
rm -rf ros2_ws
|
||||
|
||||
@@ -14,6 +14,6 @@ RUN source /ros_entrypoint.sh && \
|
||||
apt-get update && \
|
||||
rosdep install --from-paths src --ignore-src -r -y -t build_export -t test -t build -t buildtool_export -t buildtool --skip-keys="rtabmap nav2_bringup realsense2_camera nav2_msgs grid_map_ros" && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/ && \
|
||||
colcon build --event-handlers console_direct+ --install-base /opt/ros/$ROS_DISTRO --merge-install --cmake-args --debug-find -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release && \
|
||||
colcon build --event-handlers console_direct+ --install-base /opt/ros/$ROS_DISTRO --merge-install --cmake-args -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release && \
|
||||
cd && \
|
||||
rm -rf ros2_ws
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
FROM osrf/ros:lyrical-desktop
|
||||
# install rtabmap packages
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ros-lyrical-rtabmap \
|
||||
ros-lyrical-rtabmap-ros \
|
||||
&& rm -rf /var/lib/apt/lists/
|
||||
@@ -0,0 +1,19 @@
|
||||
FROM introlab3it/rtabmap:resolute
|
||||
|
||||
RUN source /ros_entrypoint.sh && \
|
||||
mkdir -p ros2_ws/src && \
|
||||
cd ros2_ws/src
|
||||
|
||||
COPY . ros2_ws/src/rtabmap_ros
|
||||
|
||||
RUN source /ros_entrypoint.sh && \
|
||||
cd ros2_ws && \
|
||||
export MAKEFLAGS="-j2" && \
|
||||
rosdep init && \
|
||||
rosdep update && \
|
||||
apt-get update && \
|
||||
rosdep install --from-paths src --ignore-src -r -y -t build_export -t test -t build -t buildtool_export -t buildtool --skip-keys="rtabmap nav2_bringup realsense2_camera nav2_msgs grid_map_ros nav2_costmap_2d" && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/ && \
|
||||
colcon build --packages-skip rtabmap_costmap_plugins rtabmap_ros --event-handlers console_direct+ --install-base /opt/ros/$ROS_DISTRO --merge-install --cmake-args -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release && \
|
||||
cd && \
|
||||
rm -rf ros2_ws
|
||||
@@ -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>rtabmap_conversions</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's conversions package. This package can be used to convert rtabmap_msgs's msgs into RTAB-Map's library objects.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -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>rtabmap_costmap_plugins</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's costmap plugins.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -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>rtabmap_demos</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's demo launch files.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -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>rtabmap_examples</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's example launch files.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -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>rtabmap_launch</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's main launch files.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -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>rtabmap_msgs</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's msgs package.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -74,6 +74,10 @@ SET(AmentLibraries
|
||||
rtabmap_sync
|
||||
)
|
||||
|
||||
IF("$ENV{ROS_DISTRO}" STRLESS "lyrical")
|
||||
add_definitions(-DPRE_ROS_LYRICAL)
|
||||
ENDIF()
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
@@ -30,9 +30,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
#include <tf2_ros/transform_broadcaster.h>
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/transform_broadcaster.hpp>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
|
||||
#include <diagnostic_updater/diagnostic_updater.hpp>
|
||||
|
||||
|
||||
@@ -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>rtabmap_odom</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's odometry package.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -362,12 +362,19 @@ void RGBDOdometry::onOdomInit()
|
||||
}
|
||||
else
|
||||
{
|
||||
image_transport::TransportHints rgb_hints(this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depth_hints(this, "raw", "depth_transport");
|
||||
std::string rgbTopic = this->get_node_topics_interface()->resolve_topic_name("rgb/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
std::string depthTopic = this->get_node_topics_interface()->resolve_topic_name("depth/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints rgb_hints(this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depth_hints(this, "raw", "depth_transport");
|
||||
image_mono_sub_.subscribe(this, rgbTopic, rgb_hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability((rmw_qos_reliability_policy_t)qos()).get_rmw_qos_profile(), options);
|
||||
image_depth_sub_.subscribe(this, depthTopic, depth_hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability((rmw_qos_reliability_policy_t)qos()).get_rmw_qos_profile(), options);
|
||||
#else
|
||||
image_transport::TransportHints rgb_hints(*this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depth_hints(*this, "raw", "depth_transport");
|
||||
image_mono_sub_.subscribe(*this, rgbTopic, rgb_hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability((rmw_qos_reliability_policy_t)qos()), options);
|
||||
image_depth_sub_.subscribe(*this, depthTopic, depth_hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability((rmw_qos_reliability_policy_t)qos()), options);
|
||||
#endif
|
||||
info_sub_.subscribe(this, "rgb/camera_info", RCLCPP_QOS(topicQueueSize_, qosCamInfo), options);
|
||||
|
||||
if(approxSync)
|
||||
|
||||
@@ -349,12 +349,17 @@ void StereoOdometry::onOdomInit()
|
||||
}
|
||||
else
|
||||
{
|
||||
image_transport::TransportHints hints(this); // using "image_transport" parameter
|
||||
|
||||
std::string leftTopic = this->get_node_topics_interface()->resolve_topic_name("left/image_rect"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
std::string rightTopic = this->get_node_topics_interface()->resolve_topic_name("right/image_rect"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints hints(this); // using "image_transport" parameter
|
||||
imageRectLeft_.subscribe(this, leftTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability((rmw_qos_reliability_policy_t)qos()).get_rmw_qos_profile(), options);
|
||||
imageRectRight_.subscribe(this, rightTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability((rmw_qos_reliability_policy_t)qos()).get_rmw_qos_profile(), options);
|
||||
#else
|
||||
image_transport::TransportHints hints(*this); // using "image_transport" parameter
|
||||
imageRectLeft_.subscribe(*this, leftTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability((rmw_qos_reliability_policy_t)qos()), options);
|
||||
imageRectRight_.subscribe(*this, rightTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability((rmw_qos_reliability_policy_t)qos()), options);
|
||||
#endif
|
||||
cameraInfoLeft_.subscribe(this, "left/camera_info", RCLCPP_QOS(topicQueueSize_, qosCamInfo), options);
|
||||
cameraInfoRight_.subscribe(this, "right/camera_info", RCLCPP_QOS(topicQueueSize_, qosCamInfo), options);
|
||||
|
||||
|
||||
@@ -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>rtabmap_python</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's python package.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -17,7 +17,9 @@ setup(
|
||||
maintainer_email='matlabbe@gmail.com',
|
||||
description="RTAB-Map's python package.",
|
||||
license='BSD',
|
||||
tests_require=['pytest'],
|
||||
extras_require={
|
||||
'test': ['pytest'],
|
||||
},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
],
|
||||
|
||||
@@ -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>rtabmap_ros</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>
|
||||
RTAB-Map Stack
|
||||
</description>
|
||||
|
||||
@@ -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>rtabmap_rviz_plugins</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's rviz plugins.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -90,6 +90,10 @@ if("$ENV{ROS_DISTRO}" STRLESS "jazzy")
|
||||
add_definitions(-DPRE_ROS_JAZZY)
|
||||
endif()
|
||||
|
||||
IF("$ENV{ROS_DISTRO}" STRLESS "lyrical")
|
||||
add_definitions(-DPRE_ROS_LYRICAL)
|
||||
ENDIF()
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
@@ -33,9 +33,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <std_srvs/srv/empty.hpp>
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/transform_broadcaster.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
#include <tf2_ros/transform_broadcaster.hpp>
|
||||
|
||||
#include <std_msgs/msg/empty.hpp>
|
||||
#include <std_msgs/msg/int32.hpp>
|
||||
|
||||
@@ -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>rtabmap_slam</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's SLAM package.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -770,10 +770,14 @@ CoreWrapper::CoreWrapper(const rclcpp::NodeOptions & options) :
|
||||
Parameters::kRGBDEnabled().c_str(),
|
||||
Parameters::kRGBDEnabled().c_str());
|
||||
}
|
||||
image_transport::TransportHints hints(this); // using "image_transport" parameter
|
||||
std::string imageTopic = this->get_node_topics_interface()->resolve_topic_name("image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints hints(this); // using "image_transport" parameter
|
||||
defaultSub_ = image_transport::create_subscription(this, imageTopic, std::bind(&CoreWrapper::defaultCallback, this, std::placeholders::_1), hints.getTransport(), rclcpp::QoS(this->getTopicQueueSize()).reliability((rmw_qos_reliability_policy_t)qosImage_).get_rmw_qos_profile(), subOptions);
|
||||
|
||||
#else
|
||||
image_transport::TransportHints hints(*this); // using "image_transport" parameter
|
||||
defaultSub_ = image_transport::create_subscription(*this, imageTopic, std::bind(&CoreWrapper::defaultCallback, this, std::placeholders::_1), hints.getTransport(), rclcpp::QoS(this->getTopicQueueSize()).reliability((rmw_qos_reliability_policy_t)qosImage_), subOptions);
|
||||
#endif
|
||||
|
||||
RCLCPP_INFO(this->get_logger(), "\n%s subscribed to:\n %s", get_name(), defaultSub_.getTopic().c_str());
|
||||
}
|
||||
|
||||
@@ -82,6 +82,10 @@ SET(AmentLibraries
|
||||
diagnostic_updater
|
||||
)
|
||||
|
||||
IF("$ENV{ROS_DISTRO}" STRLESS "lyrical")
|
||||
add_definitions(-DPRE_ROS_LYRICAL)
|
||||
ENDIF()
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
@@ -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>rtabmap_sync</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's synchronization package.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -503,12 +503,19 @@ void CommonDataSubscriber::setupDepthCallbacks(
|
||||
{
|
||||
RCLCPP_INFO(node.get_logger(), "Setup depth callback");
|
||||
|
||||
image_transport::TransportHints rgbHints(&node); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(&node, "raw", "depth_transport");
|
||||
std::string rgbTopic = node.get_node_topics_interface()->resolve_topic_name("rgb/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
std::string depthTopic = node.get_node_topics_interface()->resolve_topic_name("depth/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints rgbHints(&node); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(&node, "raw", "depth_transport");
|
||||
imageSub_.subscribe(&node, rgbTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_).get_rmw_qos_profile(), options);
|
||||
imageDepthSub_.subscribe(&node, depthTopic, depthHints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_).get_rmw_qos_profile(), options);
|
||||
#else
|
||||
image_transport::TransportHints rgbHints(node); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(node, "raw", "depth_transport");
|
||||
imageSub_.subscribe(node, rgbTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_), options);
|
||||
imageDepthSub_.subscribe(node, depthTopic, depthHints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_), options);
|
||||
#endif
|
||||
cameraInfoSub_.subscribe(&node, "rgb/camera_info", RCLCPP_QOS(topicQueueSize_, qosCameraInfo_), options);
|
||||
|
||||
#ifdef RTABMAP_SYNC_USER_DATA
|
||||
|
||||
@@ -503,9 +503,14 @@ void CommonDataSubscriber::setupRGBCallbacks(
|
||||
{
|
||||
RCLCPP_INFO(node.get_logger(), "Setup rgb-only callback");
|
||||
|
||||
image_transport::TransportHints hints(&node); // using "image_transport" parameter
|
||||
std::string rgbTopic = node.get_node_topics_interface()->resolve_topic_name("rgb/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints hints(&node); // using "image_transport" parameter
|
||||
imageSub_.subscribe(&node, rgbTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_).get_rmw_qos_profile(), options);
|
||||
#else
|
||||
image_transport::TransportHints hints(node); // using "image_transport" parameter
|
||||
imageSub_.subscribe(node, rgbTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_), options);
|
||||
#endif
|
||||
cameraInfoSub_.subscribe(&node, "rgb/camera_info", RCLCPP_QOS(topicQueueSize_, qosCameraInfo_), options);
|
||||
|
||||
#ifdef RTABMAP_SYNC_USER_DATA
|
||||
|
||||
@@ -97,11 +97,17 @@ void CommonDataSubscriber::setupStereoCallbacks(
|
||||
{
|
||||
RCLCPP_INFO(node.get_logger(), "Setup stereo callback");
|
||||
|
||||
image_transport::TransportHints hints(&node); // using "image_transport" parameter
|
||||
std::string leftTopic = node.get_node_topics_interface()->resolve_topic_name("left/image_rect"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
std::string rightTopic = node.get_node_topics_interface()->resolve_topic_name("right/image_rect"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints hints(&node); // using "image_transport" parameter
|
||||
imageRectLeft_.subscribe(&node, leftTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_).get_rmw_qos_profile(), options);
|
||||
imageRectRight_.subscribe(&node, rightTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_).get_rmw_qos_profile(), options);
|
||||
#else
|
||||
image_transport::TransportHints hints(node); // using "image_transport" parameter
|
||||
imageRectLeft_.subscribe(node, leftTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_), options);
|
||||
imageRectRight_.subscribe(node, rightTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize_).reliability(qosImage_), options);
|
||||
#endif
|
||||
cameraInfoLeft_.subscribe(&node, "left/camera_info", RCLCPP_QOS(topicQueueSize_, qosCameraInfo_), options);
|
||||
cameraInfoRight_.subscribe(&node, "right/camera_info", RCLCPP_QOS(topicQueueSize_, qosCameraInfo_), options);
|
||||
|
||||
|
||||
@@ -103,9 +103,14 @@ RGBSync::RGBSync(const rclcpp::NodeOptions & options) :
|
||||
exactSync_->registerCallback(std::bind(&RGBSync::callback, this, std::placeholders::_1, std::placeholders::_2));
|
||||
}
|
||||
|
||||
image_transport::TransportHints hints(this); // using "image_transport" parameter
|
||||
std::string rgbTopic = this->get_node_topics_interface()->resolve_topic_name("rgb/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints hints(this); // using "image_transport" parameter
|
||||
imageSub_.subscribe(this, rgbTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
#else
|
||||
image_transport::TransportHints hints(*this); // using "image_transport" parameter
|
||||
imageSub_.subscribe(*this, rgbTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
#endif
|
||||
cameraInfoSub_.subscribe(this, "rgb/camera_info", RCLCPP_QOS(topicQueueSize, qosCaminfo));
|
||||
|
||||
std::string subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync%s):\n %s,\n %s",
|
||||
|
||||
@@ -127,12 +127,19 @@ RGBDSync::RGBDSync(const rclcpp::NodeOptions & options) :
|
||||
exactSyncDepth_->registerCallback(std::bind(&RGBDSync::callback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
}
|
||||
|
||||
image_transport::TransportHints rgbHints(this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(this, "raw", "depth_transport");
|
||||
std::string rgbTopic = this->get_node_topics_interface()->resolve_topic_name("rgb/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
std::string depthTopic = this->get_node_topics_interface()->resolve_topic_name("depth/image"); // Humble/Jazzy doesn't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints rgbHints(this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(this, "raw", "depth_transport");
|
||||
imageSub_.subscribe(this, rgbTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
imageDepthSub_.subscribe(this, depthTopic, depthHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
#else
|
||||
image_transport::TransportHints rgbHints(*this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(*this, "raw", "depth_transport");
|
||||
imageSub_.subscribe(*this, rgbTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
imageDepthSub_.subscribe(*this, depthTopic, depthHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
#endif
|
||||
cameraInfoSub_.subscribe(this, "rgb/camera_info", RCLCPP_QOS(topicQueueSize, qosCamInfo));
|
||||
|
||||
std::string subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync%s):\n %s,\n %s,\n %s",
|
||||
|
||||
@@ -98,11 +98,17 @@ StereoSync::StereoSync(const rclcpp::NodeOptions & options) :
|
||||
exactSync_->registerCallback(std::bind(&StereoSync::callback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4));
|
||||
}
|
||||
|
||||
image_transport::TransportHints hints(this); // using "image_transport" parameter
|
||||
std::string leftTopic = this->get_node_topics_interface()->resolve_topic_name("left/image_rect"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
std::string rightTopic = this->get_node_topics_interface()->resolve_topic_name("right/image_rect"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints hints(this); // using "image_transport" parameter
|
||||
imageLeftSub_.subscribe(this, leftTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
imageRightSub_.subscribe(this, rightTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
#else
|
||||
image_transport::TransportHints hints(*this); // using "image_transport" parameter
|
||||
imageLeftSub_.subscribe(*this, leftTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
imageRightSub_.subscribe(*this, rightTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
#endif
|
||||
cameraInfoLeftSub_.subscribe(this, "left/camera_info", RCLCPP_QOS(topicQueueSize, qosCamInfo));
|
||||
cameraInfoRightSub_.subscribe(this, "right/camera_info", RCLCPP_QOS(topicQueueSize, qosCamInfo));
|
||||
|
||||
|
||||
@@ -87,6 +87,10 @@ if("$ENV{ROS_DISTRO}" STRLESS "jazzy")
|
||||
add_definitions(-DPRE_ROS_JAZZY)
|
||||
endif()
|
||||
|
||||
IF("$ENV{ROS_DISTRO}" STRLESS "lyrical")
|
||||
add_definitions(-DPRE_ROS_LYRICAL)
|
||||
ENDIF()
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
@@ -44,8 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <std_srvs/srv/empty.hpp>
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_broadcaster.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_broadcaster.hpp>
|
||||
|
||||
#include <rtabmap_msgs/msg/rgbd_image.hpp>
|
||||
#include <rtabmap_msgs/msg/env_sensor.hpp>
|
||||
|
||||
@@ -30,9 +30,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <sensor_msgs/msg/imu.hpp>
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/transform_broadcaster.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
#include <tf2_ros/transform_broadcaster.hpp>
|
||||
|
||||
namespace rtabmap_util
|
||||
{
|
||||
|
||||
@@ -30,8 +30,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <rtabmap_sync/SyncDiagnostic.h>
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
#include <sensor_msgs/msg/laser_scan.hpp>
|
||||
|
||||
@@ -28,8 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
#include <rtabmap_util/visibility.h>
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
|
||||
#include <message_filters/sync_policies/approximate_time.hpp>
|
||||
#include <message_filters/subscriber.hpp>
|
||||
|
||||
@@ -28,8 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <rtabmap_util/visibility.h>
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
|
||||
#include <nav_msgs/msg/odometry.hpp>
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
|
||||
@@ -34,8 +34,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <image_transport/image_transport.hpp>
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
|
||||
#include <message_filters/sync_policies/approximate_time.hpp>
|
||||
#include <message_filters/sync_policies/exact_time.hpp>
|
||||
|
||||
@@ -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>rtabmap_util</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's various useful nodes and nodelets.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -24,7 +24,7 @@ import netvlad_tf.nets as nets
|
||||
from std_msgs.msg import String
|
||||
from sensor_msgs.msg import Image
|
||||
from cv_bridge import CvBridge, CvBridgeError
|
||||
from rtabmap_python import compression as cp
|
||||
from rtabmap_python import cv_compression as cp
|
||||
from rtabmap_msgs.msg import GlobalDescriptor
|
||||
|
||||
class netvlad_ros:
|
||||
|
||||
@@ -87,6 +87,9 @@ int main(int argc, char **argv)
|
||||
|
||||
rclcpp::Rate pauseRate(10);
|
||||
|
||||
rclcpp::executors::SingleThreadedExecutor executor;
|
||||
executor.add_node(node);
|
||||
|
||||
while(rclcpp::ok())
|
||||
{
|
||||
if(!node->publishNextFrame()) {
|
||||
@@ -117,7 +120,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
pauseRate.sleep();
|
||||
rclcpp::spin_some(node);
|
||||
executor.spin_some();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,11 @@ void DbPlayer::initializePublishers(const rtabmap::OdometryEvent & odom)
|
||||
else
|
||||
{
|
||||
if(rgbPub_.getTopic().empty()) {
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
rgbPub_ = image_transport::create_publisher(this, "rgb/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_).get_rmw_qos_profile());
|
||||
#else
|
||||
rgbPub_ = image_transport::create_publisher(*this, "rgb/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_));
|
||||
#endif
|
||||
RCLCPP_INFO(get_logger(), "Gray/RGB image \"%s\" will be published.", rgbPub_.getTopic().c_str());
|
||||
}
|
||||
if(!rgbInfoPub_.get()) {
|
||||
@@ -228,7 +232,11 @@ void DbPlayer::initializePublishers(const rtabmap::OdometryEvent & odom)
|
||||
RCLCPP_INFO(get_logger(), "Gray/RGB calibration \"%s\" will be published.", rgbInfoPub_->get_topic_name());
|
||||
}
|
||||
if(depthPub_.getTopic().empty()) {
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
depthPub_ = image_transport::create_publisher(this, "depth/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_).get_rmw_qos_profile());
|
||||
#else
|
||||
depthPub_ = image_transport::create_publisher(*this, "depth/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_));
|
||||
#endif
|
||||
RCLCPP_INFO(get_logger(), "Depth image \"%s\" will be published.", depthPub_.getTopic().c_str());
|
||||
}
|
||||
if(!depthInfoPub_.get()) {
|
||||
@@ -254,7 +262,11 @@ void DbPlayer::initializePublishers(const rtabmap::OdometryEvent & odom)
|
||||
else
|
||||
{
|
||||
if(leftPub_.getTopic().empty()) {
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
leftPub_ = image_transport::create_publisher(this, "left/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_).get_rmw_qos_profile());
|
||||
#else
|
||||
leftPub_ = image_transport::create_publisher(*this, "left/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_));
|
||||
#endif
|
||||
RCLCPP_INFO(get_logger(), "Left image \"%s\" will be published.", leftPub_.getTopic().c_str());
|
||||
}
|
||||
if(!leftInfoPub_.get()) {
|
||||
@@ -262,7 +274,11 @@ void DbPlayer::initializePublishers(const rtabmap::OdometryEvent & odom)
|
||||
RCLCPP_INFO(get_logger(), "Left calibration \"%s\" will be published.", leftInfoPub_->get_topic_name());
|
||||
}
|
||||
if(rightPub_.getTopic().empty()) {
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
rightPub_ = image_transport::create_publisher(this, "right/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_).get_rmw_qos_profile());
|
||||
#else
|
||||
rightPub_ = image_transport::create_publisher(*this, "right/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_));
|
||||
#endif
|
||||
RCLCPP_INFO(get_logger(), "Right image \"%s\" will be published.", rightPub_.getTopic().c_str());
|
||||
}
|
||||
if(!rightInfoPub_.get()) {
|
||||
@@ -274,7 +290,11 @@ void DbPlayer::initializePublishers(const rtabmap::OdometryEvent & odom)
|
||||
}
|
||||
else if(imagePub_.getTopic().empty())
|
||||
{
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
imagePub_ = image_transport::create_publisher(this, "image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_).get_rmw_qos_profile());
|
||||
#else
|
||||
imagePub_ = image_transport::create_publisher(*this, "image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos_));
|
||||
#endif
|
||||
RCLCPP_INFO(get_logger(), "Image \"%s\" without calibration will be published.", imagePub_.getTopic().c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,13 @@ DisparityToDepth::DisparityToDepth(const rclcpp::NodeOptions & options) :
|
||||
int qos = RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT;
|
||||
qos = this->declare_parameter("qos", qos);
|
||||
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
pub32f_ = image_transport::create_publisher(this, "depth", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
pub16u_ = image_transport::create_publisher(this, "depth_raw", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
#else
|
||||
pub32f_ = image_transport::create_publisher(*this, "depth", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
pub16u_ = image_transport::create_publisher(*this, "depth_raw", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
#endif
|
||||
|
||||
sub_ = create_subscription<stereo_msgs::msg::DisparityImage>("disparity", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos), std::bind(&DisparityToDepth::callback, this, std::placeholders::_1));
|
||||
}
|
||||
|
||||
@@ -157,9 +157,14 @@ PointCloudXYZ::PointCloudXYZ(const rclcpp::NodeOptions & options) :
|
||||
|
||||
cloudPub_ = create_publisher<sensor_msgs::msg::PointCloud2>("cloud", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
|
||||
image_transport::TransportHints hints(this, "raw", "depth_transport");
|
||||
std::string depthTopic = this->get_node_topics_interface()->resolve_topic_name("depth/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints hints(this, "raw", "depth_transport");
|
||||
imageDepthSub_.subscribe(this, depthTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
#else
|
||||
image_transport::TransportHints hints(*this, "raw", "depth_transport");
|
||||
imageDepthSub_.subscribe(*this, depthTopic, hints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
#endif
|
||||
cameraInfoSub_.subscribe(this, "depth/camera_info", RCLCPP_QOS(topicQueueSize, qosCamInfo));
|
||||
|
||||
disparitySub_.subscribe(this, "disparity/image", RCLCPP_QOS(topicQueueSize, qos));
|
||||
|
||||
@@ -186,20 +186,32 @@ PointCloudXYZRGB::PointCloudXYZRGB(const rclcpp::NodeOptions & options) :
|
||||
exactSyncStereo_->registerCallback(std::bind(&PointCloudXYZRGB::stereoCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4));
|
||||
}
|
||||
|
||||
image_transport::TransportHints rgbHints(this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(this, "raw", "depth_transport");
|
||||
std::string rgbTopic = this->get_node_topics_interface()->resolve_topic_name("rgb/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
std::string depthTopic = this->get_node_topics_interface()->resolve_topic_name("depth/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
image_transport::TransportHints rgbHints(this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(this, "raw", "depth_transport");
|
||||
imageSub_.subscribe(this, rgbTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
imageDepthSub_.subscribe(this, depthTopic, depthHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
#else
|
||||
image_transport::TransportHints rgbHints(*this); // using "image_transport" parameter
|
||||
image_transport::TransportHints depthHints(*this, "raw", "depth_transport");
|
||||
imageSub_.subscribe(*this, rgbTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
imageDepthSub_.subscribe(*this, depthTopic, depthHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
#endif
|
||||
cameraInfoSub_.subscribe(this, "rgb/camera_info", RCLCPP_QOS(topicQueueSize, qosCamInfo));
|
||||
|
||||
imageDisparitySub_.subscribe(this, "disparity", RCLCPP_QOS(topicQueueSize, qos));
|
||||
|
||||
std::string leftTopic = this->get_node_topics_interface()->resolve_topic_name("left/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
std::string rightTopic = this->get_node_topics_interface()->resolve_topic_name("right/image"); // Humble/Jazzy don't resolve base topic, fixed by https://github.com/ros-perception/image_common/commit/ea7589ae8c1f7ecb83d6aab7b4c890c2d630d27a
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
imageLeft_.subscribe(this, leftTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
imageRight_.subscribe(this, rightTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
#else
|
||||
imageLeft_.subscribe(*this, leftTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
imageRight_.subscribe(*this, rightTopic, rgbHints.getTransport(), rclcpp::QoS(topicQueueSize).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
#endif
|
||||
cameraInfoLeft_.subscribe(this, "left/camera_info", RCLCPP_QOS(topicQueueSize, qosCamInfo));
|
||||
cameraInfoRight_.subscribe(this, "right/camera_info", RCLCPP_QOS(topicQueueSize, qosCamInfo));
|
||||
}
|
||||
|
||||
@@ -107,8 +107,13 @@ PointCloudToDepthImage::PointCloudToDepthImage(const rclcpp::NodeOptions & optio
|
||||
RCLCPP_INFO(this->get_logger(), " decimation=%d", decimation_);
|
||||
RCLCPP_INFO(this->get_logger(), " upscale=%s (upscale_depth_error_ratio=%f)", upscale_?"true":"false", upscaleDepthErrorRatio_);
|
||||
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
depthImage16Pub_ = image_transport::create_publisher(this, "image_raw", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile()); // 16 bits unsigned in mm
|
||||
depthImage32Pub_ = image_transport::create_publisher(this, "image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());// 32 bits float in meters
|
||||
#else
|
||||
depthImage16Pub_ = image_transport::create_publisher(*this, "image_raw", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos)); // 16 bits unsigned in mm
|
||||
depthImage32Pub_ = image_transport::create_publisher(*this, "image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos));// 32 bits float in meters
|
||||
#endif
|
||||
pointCloudTransformedPub_ = create_publisher<sensor_msgs::msg::PointCloud2>("cloud_transformed", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
cameraInfo16Pub_ = create_publisher<sensor_msgs::msg::CameraInfo>(depthImage16Pub_.getTopic()+"/camera_info", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qosCamInfo));
|
||||
cameraInfo32Pub_ = create_publisher<sensor_msgs::msg::CameraInfo>(depthImage32Pub_.getTopic()+"/camera_info", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qosCamInfo));
|
||||
|
||||
@@ -46,8 +46,13 @@ RGBDSplit::RGBDSplit(const rclcpp::NodeOptions & options) :
|
||||
|
||||
rgbdImageSub_ = create_subscription<rtabmap_msgs::msg::RGBDImage>("rgbd_image", rclcpp::QoS(5).reliability((rmw_qos_reliability_policy_t)qos), std::bind(&RGBDSplit::callback, this, std::placeholders::_1));
|
||||
|
||||
#ifdef PRE_ROS_LYRICAL
|
||||
rgbPub_ = image_transport::create_publisher(this, std::string(rgbdImageSub_->get_topic_name()) + "/rgb/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
depthPub_ = image_transport::create_publisher(this, std::string(rgbdImageSub_->get_topic_name()) + "/depth/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos).get_rmw_qos_profile());
|
||||
#else
|
||||
rgbPub_ = image_transport::create_publisher(*this, std::string(rgbdImageSub_->get_topic_name()) + "/rgb/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
depthPub_ = image_transport::create_publisher(*this, std::string(rgbdImageSub_->get_topic_name()) + "/depth/image", rclcpp::QoS(1).reliability((rmw_qos_reliability_policy_t)qos));
|
||||
#endif
|
||||
rgbInfoPub_ = this->create_publisher<sensor_msgs::msg::CameraInfo>(std::string(rgbdImageSub_->get_topic_name()) + "/rgb/camera_info", 1);
|
||||
depthInfoPub_ = this->create_publisher<sensor_msgs::msg::CameraInfo>(std::string(rgbdImageSub_->get_topic_name()) + "/depth/camera_info", 1);
|
||||
}
|
||||
|
||||
@@ -38,8 +38,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/utilite/UEventsHandler.h"
|
||||
#include "rtabmap/core/Transform.h"
|
||||
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
|
||||
#include <geometry_msgs/msg/twist_stamped.hpp>
|
||||
#include <nav_msgs/msg/path.hpp>
|
||||
|
||||
@@ -32,8 +32,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
#include <QMainWindow>
|
||||
#include "rtabmap_msgs/msg/rgbd_image.hpp"
|
||||
#include <tf2_ros/buffer.h>
|
||||
#include <tf2_ros/transform_listener.h>
|
||||
#include <tf2_ros/buffer.hpp>
|
||||
#include <tf2_ros/transform_listener.hpp>
|
||||
#include <rtabmap/core/Parameters.h>
|
||||
#include <rtabmap/utilite/UEventsSender.h>
|
||||
|
||||
|
||||
@@ -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>rtabmap_viz</name>
|
||||
<version>0.22.1</version>
|
||||
<version>0.23.7</version>
|
||||
<description>RTAB-Map's visualization package.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
Reference in New Issue
Block a user