Skip to content

Commit

Permalink
Fix potential UB with comments, updated README to build with rmf.repos
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Jan 20, 2025
1 parent bc73f23 commit 5d3daf8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ mkdir ~/ws_nexus/src -p
cd ~/ws_nexus/src/
git clone git@github.com:osrf/nexus
vcs import . < nexus/abb.repos
vcs import . < nexus/rmf.repos
cd ~/ws_nexus
rosdep install --from-paths src --ignore-src --rosdistro jazzy -y -r
```
Expand Down
12 changes: 12 additions & 0 deletions nexus_capabilities/src/capabilities/rmf_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ BT::NodeStatus WaitForAmr::onStart()

this->_workcell = *workcell;
this->_rmf_task_id = *rmf_task_id;
this->_amr_ready = false;

RCLCPP_INFO(
this->_node->get_logger(),
"CHECKING: workcell [%s], rmf_task_id [%s], amr_ready: [%s]",
this->_workcell.c_str(),
this->_rmf_task_id.c_str(),
this->_amr_ready ? "amr ready" : "amr not ready"
);

this->_dispenser_request_sub = this->_node->create_subscription<DispenserRequest>("/dispenser_requests", 10,
[&](DispenserRequest::UniquePtr msg)
Expand All @@ -285,6 +294,9 @@ void WaitForAmr::dispenser_request_cb(const DispenserRequest& msg)
if (msg.request_guid == this->_rmf_task_id &&
msg.target_guid == this->_workcell)
{
RCLCPP_INFO(
this->_node->get_logger(), "workcell %s: got dispenser request with target guid: %s", this->_workcell.c_str(), msg.target_guid.c_str()
);
this->_amr_ready = true;
}
}
Expand Down

0 comments on commit 5d3daf8

Please sign in to comment.