mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-09-12 06:10:19 +08:00
merged master->ros2
This commit is contained in:
+14
-25
@@ -20,53 +20,42 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-18.04]
|
||||
os: [ubuntu-20.04]
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
ros_distro: 'noetic'
|
||||
- os: ubuntu-18.04
|
||||
ros_distro: 'melodic'
|
||||
|
||||
|
||||
steps:
|
||||
- uses: ros-tooling/setup-ros@v0.2
|
||||
with:
|
||||
required-ros-distributions: ${{ matrix.ros_distro }}
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install ros-${{ matrix.ros_distro }}-rtabmap-ros
|
||||
sudo apt-get -y install ros-${{ matrix.ros_distro }}-rtabmap-ros python3-catkin-tools
|
||||
sudo apt-get -y remove ros-${{ matrix.ros_distro }}-rtabmap
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'introlab/rtabmap'
|
||||
path: 'rtabmap'
|
||||
|
||||
|
||||
- name: Setup catkin workspace
|
||||
run: |
|
||||
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
|
||||
mkdir -p ${{github.workspace}}/catkin_ws/src
|
||||
cd ${{github.workspace}}/catkin_ws/src
|
||||
catkin_init_workspace
|
||||
cd ..
|
||||
catkin_make
|
||||
|
||||
catkin config --init --cmake-args -DSETUPTOOLS_DEB_LAYOUT=OFF
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'introlab/rtabmap'
|
||||
path: 'catkin_ws/src/rtabmap'
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
path: 'catkin_ws/src/rtabmap_ros'
|
||||
|
||||
- name: Build latest rtabmap library
|
||||
run: |
|
||||
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
|
||||
cd ${{github.workspace}}/rtabmap
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/catkin_ws/devel
|
||||
cmake --build build --config ${{env.BUILD_TYPE}} --target install
|
||||
|
||||
- name: caktkin_make
|
||||
- name: caktkin build
|
||||
run: |
|
||||
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
|
||||
source ${{github.workspace}}/catkin_ws/devel/setup.bash
|
||||
cd ${{github.workspace}}/catkin_ws
|
||||
catkin_make -DSETUPTOOLS_DEB_LAYOUT=OFF
|
||||
catkin_make install
|
||||
catkin build -p 1 -i
|
||||
|
||||
@@ -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.21.0</version>
|
||||
<version>0.21.1</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_demos</name>
|
||||
<version>0.21.0</version>
|
||||
<version>0.21.1</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.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's example launch files.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
@@ -16,6 +16,8 @@
|
||||
<exec_depend>rtabmap_slam</exec_depend>
|
||||
<exec_depend>rtabmap_util</exec_depend>
|
||||
<exec_depend>rtabmap_rviz_plugins</exec_depend>
|
||||
<exec_depend>rtabmap_slam</exec_depend>
|
||||
<exec_depend>rtabmap_util</exec_depend>
|
||||
<exec_depend>rtabmap_viz</exec_depend>
|
||||
<exec_depend>imu_filter_madgwick</exec_depend>
|
||||
<exec_depend>tf2_ros</exec_depend>
|
||||
|
||||
@@ -7,4 +7,4 @@ install(DIRECTORY launch
|
||||
DESTINATION share/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
ament_package()
|
||||
ament_package()
|
||||
|
||||
@@ -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.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's main launch files.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
@@ -17,6 +17,8 @@
|
||||
<exec_depend>rtabmap_msgs</exec_depend>
|
||||
<exec_depend>rtabmap_util</exec_depend>
|
||||
<exec_depend>rtabmap_rviz_plugins</exec_depend>
|
||||
<exec_depend>rtabmap_slam</exec_depend>
|
||||
<exec_depend>rtabmap_util</exec_depend>
|
||||
<exec_depend>rtabmap_viz</exec_depend>
|
||||
|
||||
<export>
|
||||
|
||||
@@ -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.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's msgs package.</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_odom</name>
|
||||
<version>0.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's odometry package.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace rtabmap_odom
|
||||
|
||||
ICPOdometry::ICPOdometry(const rclcpp::NodeOptions & options) :
|
||||
OdometryROS("icp_odometry", options),
|
||||
scanCloudMaxPoints_(0),
|
||||
scanCloudMaxPoints_(-1),
|
||||
scanCloudIs2d_(false),
|
||||
scanDownsamplingStep_(1),
|
||||
scanRangeMin_(0),
|
||||
@@ -68,7 +68,6 @@ ICPOdometry::ICPOdometry(const rclcpp::NodeOptions & options) :
|
||||
|
||||
ICPOdometry::~ICPOdometry()
|
||||
{
|
||||
//plugins_.clear();
|
||||
}
|
||||
|
||||
void ICPOdometry::onOdomInit()
|
||||
@@ -624,19 +623,26 @@ void ICPOdometry::callbackCloud(const sensor_msgs::msg::PointCloud2::SharedPtr p
|
||||
}
|
||||
}
|
||||
|
||||
if(scanCloudMaxPoints_ == 0 && cloudMsg->height > 1)
|
||||
if(cloudMsg->height > 1) // organized cloud
|
||||
{
|
||||
if(scanCloudMaxPoints_ == -1)
|
||||
{
|
||||
scanCloudMaxPoints_ = cloudMsg->height * cloudMsg->width;
|
||||
RCLCPP_WARN(this->get_logger(), "IcpOdometry: \"scan_cloud_max_points\" is not set but input "
|
||||
"cloud is not dense, for convenience it will be set to %d (%dx%d)",
|
||||
scanCloudMaxPoints_, cloudMsg->width, cloudMsg->height);
|
||||
}
|
||||
else if(scanCloudMaxPoints_ > 0 && scanCloudMaxPoints_ < int(cloudMsg->height * cloudMsg->width))
|
||||
{
|
||||
RCLCPP_WARN(this->get_logger(), "IcpOdometry: \"scan_cloud_max_points\" is set to %d but input "
|
||||
"cloud is not dense and has a size of %d (%dx%d), setting to this later size.",
|
||||
scanCloudMaxPoints_, cloudMsg->width *cloudMsg->height, cloudMsg->width, cloudMsg->height);
|
||||
scanCloudMaxPoints_ = cloudMsg->width *cloudMsg->height;
|
||||
}
|
||||
}
|
||||
if(scanCloudMaxPoints_ == -1)
|
||||
{
|
||||
scanCloudMaxPoints_ = cloudMsg->height * cloudMsg->width;
|
||||
RCLCPP_WARN(this->get_logger(), "IcpOdometry: \"scan_cloud_max_points\" is not set but input "
|
||||
"cloud is not dense, for convenience it will be set to %d (%dx%d)",
|
||||
scanCloudMaxPoints_, cloudMsg->width, cloudMsg->height);
|
||||
}
|
||||
else if(cloudMsg->height > 1 && scanCloudMaxPoints_ < int(cloudMsg->height * cloudMsg->width))
|
||||
{
|
||||
RCLCPP_WARN(this->get_logger(), "IcpOdometry: \"scan_cloud_max_points\" is set to %d but input "
|
||||
"cloud is not dense and has a size of %d (%dx%d), setting to this later size.",
|
||||
scanCloudMaxPoints_, cloudMsg->width *cloudMsg->height, cloudMsg->width, cloudMsg->height);
|
||||
scanCloudMaxPoints_ = cloudMsg->width *cloudMsg->height;
|
||||
scanCloudMaxPoints_ = 0;
|
||||
}
|
||||
int maxLaserScans = scanCloudMaxPoints_;
|
||||
|
||||
|
||||
@@ -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.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's python package.</description>
|
||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||
<author>Mathieu Labbe</author>
|
||||
|
||||
@@ -3,4 +3,4 @@ project(rtabmap_ros)
|
||||
|
||||
find_package(ament_cmake REQUIRED)
|
||||
|
||||
ament_package()
|
||||
ament_package()
|
||||
|
||||
@@ -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.21.0</version>
|
||||
<version>0.21.1</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.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's rviz 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_slam</name>
|
||||
<version>0.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's SLAM package.</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_sync</name>
|
||||
<version>0.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's synchronization package.</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_util</name>
|
||||
<version>0.21.0</version>
|
||||
<version>0.21.1</version>
|
||||
<description>RTAB-Map's various useful nodes and nodelets.</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_viz</name>
|
||||
<version>0.21.0</version>
|
||||
<version>0.21.1</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