-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
port platooning_control to ros2 #2377
Changes from 12 commits
b41cc12
2e7b207
5531d40
7aa4b27
39e3136
7920d09
7377dea
6262e36
ea4129d
d5f0d94
8a998cc
1615810
391b412
e4b900c
f140c49
3572383
0c7beb8
d18d40c
82d7f6b
36b9943
5bd7d5d
73c0dac
e434aaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,12 @@ namespace carma_guidance_plugins | |
{ | ||
|
||
/** | ||
* \brief ControlPlugin base class which can be extended by user provided plugins which wish to implement the Control Plugin ROS API. | ||
* | ||
* A control plugin is responsible for generating high frequency vehicle speed and steering commands to execute the currently planned trajectory. | ||
* This plugin provides default subscribers to track the pose, velocity, and current trajectory in the system. | ||
* Extending classes must implement the generate_command() method to use that data and or additional data to plan commands at a 30Hz frequency. | ||
* | ||
* \brief ControlPlugin base class which can be extended by user provided plugins which wish to implement the Control Plugin ROS API. | ||
* | ||
* A control plugin is responsible for generating high frequency vehicle speed and steering commands to execute the currently planned trajectory. | ||
* This plugin provides default subscribers to track the pose, velocity, and current trajectory in the system. | ||
* Extending classes must implement the generate_command() method to use that data and or additional data to plan commands at a 30Hz frequency. | ||
* | ||
*/ | ||
class ControlPlugin : public PluginBaseNode | ||
{ | ||
|
@@ -53,7 +53,6 @@ namespace carma_guidance_plugins | |
// These callbacks do direct assignment into their respective member variables | ||
void current_pose_callback(geometry_msgs::msg::PoseStamped::UniquePtr msg); | ||
void current_twist_callback(geometry_msgs::msg::TwistStamped::UniquePtr msg); | ||
void current_trajectory_callback(carma_planning_msgs::msg::TrajectoryPlan::UniquePtr msg); | ||
|
||
|
||
protected: | ||
|
@@ -71,23 +70,28 @@ namespace carma_guidance_plugins | |
|
||
public: | ||
/** | ||
* \brief ControlPlugin constructor | ||
* \brief ControlPlugin constructor | ||
*/ | ||
explicit ControlPlugin(const rclcpp::NodeOptions &); | ||
|
||
//! Virtual destructor for safe deletion | ||
virtual ~ControlPlugin() = default; | ||
|
||
/** | ||
* \brief Extending class provided method which should generate a command message | ||
* \brief Extending class provided method which should generate a command message | ||
* which will be published to the required topic by the base class | ||
* | ||
* | ||
* NOTE: Implementer can determine if trajectory has changed based on current_trajectory_->trajectory_id | ||
* | ||
* | ||
* \return The command message to publish | ||
*/ | ||
*/ | ||
virtual autoware_msgs::msg::ControlCommandStamped generate_command() = 0; | ||
|
||
/** | ||
* \brief Extending class provided method which can optionally handle trajectory plan callbacks. | ||
*/ | ||
virtual void current_trajectory_callback(carma_planning_msgs::msg::TrajectoryPlan::UniquePtr msg); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont think you can make the trajectory callback pure virtual, other controllers dont have their own implementation and depend on it to receive the trajectory. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one won't be pure virtual (doesn't include the =0). Also i'm able to build the pure pursuit wrapper There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right, it was shown in multiple lanes and I thought I saw the =0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I put all the callbacks in protected, can you do the same? to avoid merge conflicts? |
||
|
||
//// | ||
// Overrides | ||
//// | ||
|
@@ -102,7 +106,7 @@ namespace carma_guidance_plugins | |
carma_ros2_utils::CallbackReturn handle_on_activate(const rclcpp_lifecycle::State &) override final; | ||
carma_ros2_utils::CallbackReturn handle_on_deactivate(const rclcpp_lifecycle::State &) override final; | ||
carma_ros2_utils::CallbackReturn handle_on_cleanup(const rclcpp_lifecycle::State &) override final; | ||
carma_ros2_utils::CallbackReturn handle_on_shutdown(const rclcpp_lifecycle::State &) override final; | ||
carma_ros2_utils::CallbackReturn handle_on_shutdown(const rclcpp_lifecycle::State &) override final; | ||
carma_ros2_utils::CallbackReturn handle_on_error(const rclcpp_lifecycle::State &, const std::string &exception_string) override final; | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove the ihp plugin too. We wont need it