mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-12 12:39:50 +08:00
Supporting image compression formats passthrough (#1461)
* Supporting ros depth compression formats passthrough * Added image_compression_format (support jpg,png). Use Compression.h constants. * Bridging gap with #1457 * CoreWrapper: decode_images_on_demand * rgbd_sync->rgbd_split encoding/decoding test with image_transport validation. rgbd_split color passthrough * more tests * fixing ci on kilted+ * fixing test * fixing lyrical tests * fixing rolling ci * Improved test coverage * fixing some tf waitForTransform deadlocks when sim time is used in tests * CI: build rtabmap_slam on rolling rtabmap_slam builds without nav2_msgs, which is not on resolute yet: skip its key instead of leaving the package out. Only rtabmap_costmap_plugins (and the rtabmap_ros metapackage pulling it in) still need nav2.
This commit is contained in:
@@ -987,6 +987,26 @@ TEST_F(OdometryRosTest, publishes_compressed_sensor_data_when_asked)
|
||||
<< "the raw scan should have been replaced by the compressed one";
|
||||
}
|
||||
|
||||
/// Same, compressing in the odometry thread instead of one thread per sensor.
|
||||
TEST_F(OdometryRosTest, publishes_compressed_sensor_data_without_parallel_compression)
|
||||
{
|
||||
publishSensorTf();
|
||||
std::shared_ptr<Collector<nav_msgs::msg::Odometry>> odom =
|
||||
collect<nav_msgs::msg::Odometry>("odom");
|
||||
std::shared_ptr<Collector<rtabmap_msgs::msg::SensorData>> compressed =
|
||||
collect<rtabmap_msgs::msg::SensorData>("odom_sensor_data/compressed");
|
||||
makeNode({rclcpp::Parameter("publish_compressed_sensor_data", true),
|
||||
rclcpp::Parameter("sensor_data_parallel_compression", false)});
|
||||
|
||||
rclcpp::Publisher<sensor_msgs::msg::PointCloud2>::SharedPtr pub = scanPublisher();
|
||||
ASSERT_TRUE(waitForSubscriber(pub));
|
||||
feedFrames(pub, odom, 2);
|
||||
ASSERT_TRUE(spinUntil([&]() { return !compressed->empty(); }))
|
||||
<< "nothing was published on odom_sensor_data/compressed";
|
||||
EXPECT_GT(compressed->back().laser_scan_compressed.size(), 0u);
|
||||
EXPECT_EQ(0u, compressed->back().laser_scan.data.size());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The whole recovery story, as a wheeled robot would live it: a guess frame it trusts,
|
||||
|
||||
Reference in New Issue
Block a user