Skip to content

Commit

Permalink
chore: replace getData() to get_data() (#41)
Browse files Browse the repository at this point in the history
* replace getData() to get_data()

Signed-off-by: Autumn60 <[email protected]>

* replace getData to get_data

Signed-off-by: Autumn60 <[email protected]>

---------

Signed-off-by: Autumn60 <[email protected]>
  • Loading branch information
Autumn60 authored Jul 14, 2024
1 parent ba246e3 commit 96b6ccb
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ class NoCallbackSubscription
noexec_subscription_options);
}

typename TMessage::ConstSharedPtr getData()
typename TMessage::ConstSharedPtr get_data()
{
auto data = std::make_shared<TMessage>();
rclcpp::MessageInfo message_info;
6 changes: 3 additions & 3 deletions src/planning/dwa_planner/src/dwa_planner.cpp
Original file line number Diff line number Diff line change
@@ -151,23 +151,23 @@ bool DWAPlanner::subscribe_and_validate()

bool DWAPlanner::try_subscribe_map()
{
auto map_msg = map_sub_->getData();
auto map_msg = map_sub_->get_data();
if (!map_msg) return false;
map_ = map_msg;
return true;
}

bool DWAPlanner::try_subscribe_odom()
{
auto odom_msg = odom_sub_->getData();
auto odom_msg = odom_sub_->get_data();
if (!odom_msg) return false;
odom_ = odom_msg;
return true;
}

bool DWAPlanner::try_subscribe_goal()
{
auto goal_msg = goal_sub_->getData();
auto goal_msg = goal_sub_->get_data();
if (!goal_msg) return false;
goal_ = goal_msg;
return true;
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ PollingIntSubscriber::PollingIntSubscriber(const rclcpp::NodeOptions & options)

void PollingIntSubscriber::update()
{
const auto msg = sub_->getData();
const auto msg = sub_->get_data();
if (msg) {
std::cout << "Received: '" << msg->data << "'" << std::endl;
} else {

0 comments on commit 96b6ccb

Please sign in to comment.