Skip to content

Commit

Permalink
change name of msg
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Najjar <[email protected]>
  • Loading branch information
tonynajjar committed Dec 3, 2024
1 parent e16fbb0 commit cbd715d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <vector>

#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_msgs/msg/poses_stamped.hpp"
#include "nav2_msgs/msg/pose_stamped_array.hpp"

#include "behaviortree_cpp/decorator_node.h"

Expand Down Expand Up @@ -80,10 +80,10 @@ class GoalUpdater : public BT::DecoratorNode
* @brief Callback function for goals update topic
* @param msg Shared pointer to vector of geometry_msgs::msg::PoseStamped message
*/
void callback_updated_goals(const nav2_msgs::msg::PosesStamped::SharedPtr msg);
void callback_updated_goals(const nav2_msgs::msg::PoseStampedArray::SharedPtr msg);

rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr goal_sub_;
rclcpp::Subscription<nav2_msgs::msg::PosesStamped>::SharedPtr goals_sub_;
rclcpp::Subscription<nav2_msgs::msg::PoseStampedArray>::SharedPtr goals_sub_;

geometry_msgs::msg::PoseStamped last_goal_received_;
Goals last_goals_received_;
Expand Down
4 changes: 2 additions & 2 deletions nav2_behavior_tree/plugins/decorator/goal_updater_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ GoalUpdater::GoalUpdater(
rclcpp::SystemDefaultsQoS(),
std::bind(&GoalUpdater::callback_updated_goal, this, _1),
sub_option);
goals_sub_ = node_->create_subscription<nav2_msgs::msg::PosesStamped>(
goals_sub_ = node_->create_subscription<nav2_msgs::msg::PoseStampedArray>(
goals_updater_topic,
rclcpp::SystemDefaultsQoS(),
std::bind(&GoalUpdater::callback_updated_goals, this, _1),
Expand Down Expand Up @@ -101,7 +101,7 @@ GoalUpdater::callback_updated_goal(const geometry_msgs::msg::PoseStamped::Shared
}

void
GoalUpdater::callback_updated_goals(const nav2_msgs::msg::PosesStamped::SharedPtr msg)
GoalUpdater::callback_updated_goals(const nav2_msgs::msg::PoseStampedArray::SharedPtr msg)

Check warning on line 104 in nav2_behavior_tree/plugins/decorator/goal_updater_node.cpp

View check run for this annotation

Codecov / codecov/patch

nav2_behavior_tree/plugins/decorator/goal_updater_node.cpp#L104

Added line #L104 was not covered by tests
{
std::lock_guard<std::mutex> lock(mutex_);
last_goals_received_ = msg->poses;

Check warning on line 107 in nav2_behavior_tree/plugins/decorator/goal_updater_node.cpp

View check run for this annotation

Codecov / codecov/patch

nav2_behavior_tree/plugins/decorator/goal_updater_node.cpp#L106-L107

Added lines #L106 - L107 were not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion nav2_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"msg/BehaviorTreeLog.msg"
"msg/Particle.msg"
"msg/ParticleCloud.msg"
"msg/PosesStamped.msg"
"msg/PoseStampedArray.msg"
"msg/MissedWaypoint.msg"
"srv/GetCosts.srv"
"srv/GetCostmap.srv"
Expand Down
4 changes: 4 additions & 0 deletions nav2_msgs/msg/PoseStampedArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# An array of stamped poses with a header for global reference.

std_msgs/Header header
geometry_msgs/PoseStamped[] poses
1 change: 0 additions & 1 deletion nav2_msgs/msg/PosesStamped.msg

This file was deleted.

0 comments on commit cbd715d

Please sign in to comment.