Skip to content

Commit

Permalink
added TracjectorySetpoint update() overload
Browse files Browse the repository at this point in the history
  • Loading branch information
dakejahl committed Jul 24, 2024
1 parent 4c7b8da commit b2c0440
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class TrajectorySetpointType : public SetpointBase
std::optional<float> yaw_ned_rad = {},
std::optional<float> yaw_rate_ned_rad_s = {});

void update(const px4_msgs::msg::TrajectorySetpoint& setpoint);

private:
rclcpp::Node & _node;
rclcpp::Publisher<px4_msgs::msg::TrajectorySetpoint>::SharedPtr _trajectory_setpoint_pub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ void TrajectorySetpointType::update(

}

void TrajectorySetpointType::update(const px4_msgs::msg::TrajectorySetpoint& setpoint)
{
onUpdate();
_trajectory_setpoint_pub->publish(setpoint);
}

SetpointBase::Configuration TrajectorySetpointType::getConfiguration()
{
Configuration config{};
Expand Down

0 comments on commit b2c0440

Please sign in to comment.