Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think .hpp is also available in Kilted and older, do we need this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which .hpp file do you mean? the tf2_ros .hpp files? That change only went in July, so the "treat deprecations as errors" compile failures only need to be addressed in Rolling.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the tf2 ros hpp files, it is also backported and now available in Kilted and order, so I think it's fine for older distribution to use .hpp as well

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing out using tf2_ros hpp includes in Kilted now.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#pragma once

#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
#include <rclcpp_action/rclcpp_action.hpp>

#include <pluginlib/class_loader.hpp>
Expand All @@ -58,8 +59,15 @@
#include <moveit/local_planner/local_constraint_solver_interface.hpp>
#include <moveit/local_planner/trajectory_operator_interface.hpp>

// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#include <tf2_ros/transform_listener.h>
#endif

// Forward declaration of parameter class allows users to implement custom parameters
namespace local_planner_parameters
Expand Down
8 changes: 8 additions & 0 deletions moveit_ros/hybrid_planning/test/test_basic_integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,16 @@
#include <moveit/planning_scene_monitor/planning_scene_monitor.hpp>
#include <moveit/robot_state/conversions.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
#include <rclcpp_action/rclcpp_action.hpp>

// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#endif

#include <moveit_msgs/action/hybrid_planner.hpp>
#include <moveit_msgs/msg/display_robot_state.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,19 @@
/* Author: Jonas Tietz */

#include "tf_publisher_capability.hpp"

#include <rclcpp/version.h>

#include <moveit/moveit_cpp/moveit_cpp.hpp>
#include <moveit/utils/message_checks.hpp>
#include <moveit/move_group/capability_names.hpp>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/transform_broadcaster.hpp>
// For Jazzy and older
#else
#include <tf2_ros/transform_broadcaster.h>
#endif
#include <tf2_eigen/tf2_eigen.hpp>
#include <moveit/robot_state/robot_state.hpp>
#include <moveit/robot_state/attached_body.hpp>
Expand Down
10 changes: 10 additions & 0 deletions moveit_ros/move_group/src/move_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,19 @@

/* Author: Ioan Sucan */

#include <rclcpp/version.h>

#include <moveit/moveit_cpp/moveit_cpp.hpp>
#include <moveit/planning_scene_monitor/planning_scene_monitor.hpp>
// For Rolling, L-turtle, and newer

// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/transform_listener.h>
#endif
#include <moveit/move_group/move_group_capability.hpp>
#include <moveit/trajectory_execution_manager/trajectory_execution_manager.hpp>
#include <boost/tokenizer.hpp>
Expand Down
7 changes: 7 additions & 0 deletions moveit_ros/moveit_servo/demos/cpp_interface/demo_pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,15 @@
#include <moveit_servo/utils/common.hpp>
#include <mutex>
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/transform_listener.h>
#endif
#include <moveit/utils/logger.hpp>

using namespace moveit_servo;
Expand Down
7 changes: 7 additions & 0 deletions moveit_ros/moveit_servo/demos/cpp_interface/demo_twist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@
#include <moveit_servo/servo.hpp>
#include <moveit_servo/utils/common.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/transform_listener.h>
#endif
#include <moveit/utils/logger.hpp>

using namespace moveit_servo;
Expand Down
10 changes: 9 additions & 1 deletion moveit_ros/moveit_servo/include/moveit_servo/servo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@

#pragma once

#include <rclcpp/logger.hpp>
#include <rclcpp/version.h>

#include <moveit_servo/collision_monitor.hpp>
#include <moveit_servo/moveit_servo_lib_parameters.hpp>
#include <moveit_servo/utils/command.hpp>
Expand All @@ -51,9 +54,14 @@
#include <pluginlib/class_loader.hpp>
#include <sensor_msgs/msg/joint_state.hpp>
#include <tf2_eigen/tf2_eigen.hpp>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/transform_listener.h>
#endif
#include <variant>
#include <rclcpp/logger.hpp>
#include <queue>

namespace moveit_servo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@
#include <moveit_msgs/srv/save_map.hpp>

#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#endif

#include <functional>
#include <memory>
Expand Down
8 changes: 8 additions & 0 deletions moveit_ros/occupancy_map_monitor/src/occupancy_map_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@

/* Author: Jon Binney, Ioan Sucan */

#include <rclcpp/version.h>

#include <moveit/occupancy_map_monitor/occupancy_map_monitor.hpp>

#include <octomap_msgs/conversions.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/transform_listener.h>
#endif
#include <rclcpp/clock.hpp>
#include <rclcpp/executors.hpp>
#include <rclcpp/experimental/buffers/intra_process_buffer.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <rclcpp/version.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#endif

#include <memory>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@
#pragma once

#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#endif
#include <moveit/occupancy_map_monitor/occupancy_map_updater.hpp>
#include <moveit/mesh_filter/mesh_filter.hpp>
#include <moveit/mesh_filter/stereo_camera_model.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include <moveit/depth_image_octomap_updater/depth_image_octomap_updater.hpp>
#include <moveit/occupancy_map_monitor/occupancy_map_monitor.hpp>
#include <cmath>
#include <rclcpp/qos.hpp>
#include <rclcpp/version.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
// TODO: Remove conditional includes when released to all active distros.
#if __has_include(<tf2/LinearMath/Vector3.hpp>)
Expand Down Expand Up @@ -158,13 +160,26 @@ void DepthImageOctomapUpdater::start()

pub_filtered_label_image_ = filtered_label_transport_->advertiseCamera(prefix + "filtered_label", 1);

sub_depth_image_ = image_transport::create_camera_subscription(
node_.get(), image_topic_,
[this](const sensor_msgs::msg::Image::ConstSharedPtr& depth_msg,
const sensor_msgs::msg::CameraInfo::ConstSharedPtr& info_msg) {
return depthImageCallback(depth_msg, info_msg);
},
"raw", rmw_qos_profile_sensor_data);
sub_depth_image_ =
// For Rolling, L-turtle, and newer
#if RCLCPP_VERSION_GTE(30, 0, 0)
image_transport::create_camera_subscription(
*node_, image_topic_,
[this](const sensor_msgs::msg::Image::ConstSharedPtr& depth_msg,
const sensor_msgs::msg::CameraInfo::ConstSharedPtr& info_msg) {
return depthImageCallback(depth_msg, info_msg);
},
"raw", rclcpp::SensorDataQoS());
// For Kilted and older
#else
image_transport::create_camera_subscription(
node_.get(), image_topic_,
[this](const sensor_msgs::msg::Image::ConstSharedPtr& depth_msg,
const sensor_msgs::msg::CameraInfo::ConstSharedPtr& info_msg) {
return depthImageCallback(depth_msg, info_msg);
},
"raw", rmw_qos_profile_sensor_data);
#endif
}

void DepthImageOctomapUpdater::stop()
Expand Down
10 changes: 9 additions & 1 deletion moveit_ros/perception/mesh_filter/src/transform_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@
/* Author: Suat Gedikli */

#include <moveit/mesh_filter/transform_provider.hpp>
#include <tf2_ros/transform_listener.h>
#include <rclcpp/version.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#include <tf2_ros/transform_listener.h>
#endif
#include <tf2_eigen/tf2_eigen.hpp>

TransformProvider::TransformProvider(double update_rate) : stop_(true), update_rate_(update_rate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/callback_group.hpp>
#include <rclcpp/version.h>
#include <tf2_ros/transform_listener.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/message_filter.hpp>
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/message_filter.h>
#include <tf2_ros/transform_listener.h>
#endif
#if RCLCPP_VERSION_GTE(28, 3, 3) // Rolling
#include <message_filters/subscriber.hpp>
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,15 @@
#include <tf2/LinearMath/Transform.h>
#endif
#include <sensor_msgs/point_cloud2_iterator.hpp>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/create_timer_interface.hpp>
#include <tf2_ros/create_timer_Ros.hpp>
// For Jazzy and older
#else
#include <tf2_ros/create_timer_interface.h>
#include <tf2_ros/create_timer_ros.h>
#endif
#include <moveit/utils/logger.hpp>
#include <rclcpp/version.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,19 @@
#pragma once

#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
#include <moveit/controller_manager/controller_manager.hpp>
#include <moveit/planning_scene_monitor/planning_scene_monitor.hpp>
#include <moveit/planning_pipeline/planning_pipeline.hpp>
#include <moveit/trajectory_execution_manager/trajectory_execution_manager.hpp>
#include <moveit/robot_state/robot_state.hpp>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#endif

namespace moveit_cpp
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,17 @@
#include <boost/signals2.hpp>

#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
#include <sensor_msgs/msg/joint_state.hpp>
#include <tf2_msgs/msg/tf_message.hpp>

// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#endif

#include <moveit/robot_state/robot_state.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,16 @@
#pragma once

#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
#include <tf2_ros/transform_listener.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#include <tf2_ros/transform_listener.h>
#endif
#include <moveit/macros/class_forward.hpp>
#include <moveit/planning_scene/planning_scene.hpp>
#include <moveit/robot_model_loader/robot_model_loader.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <rclcpp/utilities.hpp>
#include <chrono>
#include <string>
#include <tf2_ros/qos.hpp>

#include <moveit/planning_scene_monitor/current_state_monitor_middleware_handle.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@
#include <moveit/planning_scene_monitor/current_state_monitor.hpp>
#include <moveit/utils/robot_model_test_utils.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#endif

struct MockMiddlewareHandle : public planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@
#include <moveit/planning_scene_monitor/current_state_monitor.hpp>
#include <moveit/utils/robot_model_test_utils.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/version.h>
// For Rolling, Kilted, and newer
#if RCLCPP_VERSION_GTE(29, 6, 0)
#include <tf2_ros/buffer.hpp>
// For Jazzy and older
#else
#include <tf2_ros/buffer.h>
#endif

using namespace std::chrono_literals;

Expand Down
Loading
Loading