Skip to content

Commit

Permalink
ROS2 docking fix joy (#439)
Browse files Browse the repository at this point in the history
* Fixed utils test, fixed joy

Signed-off-by: Jakub Delicat <[email protected]>

* Revert "Fixed utils test, fixed joy"

This reverts commit 3bd5e30.

* Fixed bt utils test, changed dock jot input

Signed-off-by: Jakub Delicat <[email protected]>

* Joy input and typo

Signed-off-by: Jakub Delicat <[email protected]>

---------

Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus authored Nov 8, 2024
1 parent 4189b20 commit 5fc7560
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions panther_manager/behavior_trees/docking.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
topic_name="joy"
timeout="2.0"
axes=""
buttons="0;0;0;1;1;1"/>
buttons="0;0;0;1;1;1;0;0;0;0;0;0"/>
<DockRobot name="Dock Action"
use_dock_id="true"
dock_id="main_dock"
Expand All @@ -22,7 +22,7 @@
topic_name="joy"
timeout="2.0"
axes=""
buttons="1;0;0;0;1;1"/>
buttons="1;0;0;0;1;1;0;0;0;0;0;0"/>
<UndockRobot name="Undock Action"
dock_type="panther_charging_dock"
max_undocking_time="100"
Expand Down
2 changes: 1 addition & 1 deletion panther_manager/src/plugins/condition/check_joy_msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool CheckJoyMsg::checkButtons(const JoyMsg::SharedPtr & last_msg)
RCLCPP_WARN_STREAM(
this->logger(), GetLoggerPrefix(name())
<< "Joy message has " << last_msg->buttons.size()
<< " axes, expected at least " << expected_buttons.size());
<< " buttons, expected at least " << expected_buttons.size());
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion panther_manager/test/test_behavior_tree_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ TEST(TestConvertFromStringVectorOfDouble, GoodInput)
TEST(TestConvertFromStringVectorOfFloat, WrongInput)
{
auto str = "1;2;3;0.1;a;0.2";
EXPECT_THROW(BT::convertFromString<std::vector<float>>(str), BT::RuntimeError);
EXPECT_THROW(BT::convertFromString<std::vector<float>>(str), std::invalid_argument);
}

int main(int argc, char ** argv)
Expand Down

0 comments on commit 5fc7560

Please sign in to comment.