Skip to content

Commit fef4523

Browse files
committed
feat(raw_vehicle_cmd_converter): publish vehicle adaptor output
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
1 parent a2356f3 commit fef4523

File tree

2 files changed

+9
-0
lines changed
  • vehicle/autoware_raw_vehicle_cmd_converter

2 files changed

+9
-0
lines changed

vehicle/autoware_raw_vehicle_cmd_converter/include/autoware_raw_vehicle_cmd_converter/node.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class RawVehicleCommandConverterNode : public rclcpp::Node
8282
//!< @brief topic publisher for low level vehicle command
8383
rclcpp::Publisher<ActuationCommandStamped>::SharedPtr pub_actuation_cmd_;
8484
rclcpp::Publisher<Steering>::SharedPtr pub_steering_status_;
85+
rclcpp::Publisher<Control>::SharedPtr pub_compensated_control_cmd_;
8586
//!< @brief subscriber for vehicle command
8687
rclcpp::Subscription<Control>::SharedPtr sub_control_cmd_;
8788
rclcpp::Subscription<ActuationStatusStamped>::SharedPtr sub_actuation_status_;

vehicle/autoware_raw_vehicle_cmd_converter/src/node.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ RawVehicleCommandConverterNode::RawVehicleCommandConverterNode(
118118
debug_pub_steer_pid_ = create_publisher<Float32MultiArrayStamped>(
119119
"/vehicle/raw_vehicle_cmd_converter/debug/steer_pid", 1);
120120

121+
if (use_vehicle_adaptor_) {
122+
pub_compensated_control_cmd_ = create_publisher<Control>(
123+
"/vehicle/raw_vehicle_cmd_converter/debug/compensated_control_cmd", 1);
124+
}
125+
121126
logger_configure_ = std::make_unique<autoware::universe_utils::LoggerLevelConfigure>(this);
122127
}
123128

@@ -156,6 +161,9 @@ void RawVehicleCommandConverterNode::publishActuationCmd()
156161
*control_cmd_ptr_, *current_odometry_, *current_accel,
157162
*current_steer_ptr_, *current_operation_mode)
158163
: *control_cmd_ptr_;
164+
if (use_vehicle_adaptor_) {
165+
pub_compensated_control_cmd_->publish(control_cmd);
166+
}
159167

160168
/* calculate actuation command */
161169
double desired_accel_cmd = 0.0;

0 commit comments

Comments
 (0)