Skip to content

Commit

Permalink
Needed otherwise errors at runtime if no default values
Browse files Browse the repository at this point in the history
[implement_teleop_node-11] [ERROR] robot.implement.implement_teleop:
Declare parameter joystick_mapping.axes.up_down_implement : Statically
typed parameter 'joystick_mapping.axes.up_down_implement' must be
initialized.
ref : ros2/rclcpp#1691
  • Loading branch information
vincentrou committed Nov 15, 2024
1 parent 35391a5 commit c9ec3a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions romea_teleop_drivers/src/joystick_parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ void declare_turbo_mode_button_mapping(std::shared_ptr<rclcpp::Node> node)
//-----------------------------------------------------------------------------
void declare_up_down_implement_axe_mapping(std::shared_ptr<rclcpp::Node> node)
{
declare_parameter<int>(node, UP_DOWN_IMPLEMENT_AXE_MAPPING_PARAM_NAME);
declare_parameter_with_default<int>(node, UP_DOWN_IMPLEMENT_AXE_MAPPING_PARAM_NAME, -1);
}

//-----------------------------------------------------------------------------
void declare_down_implement_button_mapping(std::shared_ptr<rclcpp::Node> node)
{
declare_parameter<int>(node, DOWN_IMPLEMENT_BUTTON_MAPPING_PARAM_NAME);
declare_parameter_with_default<int>(node, DOWN_IMPLEMENT_BUTTON_MAPPING_PARAM_NAME, -1);
}

//-----------------------------------------------------------------------------
void declare_up_implement_button_mapping(std::shared_ptr<rclcpp::Node> node)
{
declare_parameter<int>(node, UP_IMPLEMENT_BUTTON_MAPPING_PARAM_NAME);
declare_parameter_with_default<int>(node, UP_IMPLEMENT_BUTTON_MAPPING_PARAM_NAME, -1);
}

//-----------------------------------------------------------------------------
Expand Down

0 comments on commit c9ec3a3

Please # to comment.