diff --git a/raptor_dbw_can/src/raptor_dbw_can_node.cpp b/raptor_dbw_can/src/raptor_dbw_can_node.cpp index f8cfb14..f7b2b39 100644 --- a/raptor_dbw_can/src/raptor_dbw_can_node.cpp +++ b/raptor_dbw_can/src/raptor_dbw_can_node.cpp @@ -39,9 +39,9 @@ int main(int argc, char ** argv) // Get parameter values auto temp = std::make_shared("get_dbw_params_node", options); - temp->declare_parameter("dbw_dbc_file"); - temp->declare_parameter("max_steer_angle"); - + temp->declare_parameter("dbw_dbc_file", rclcpp::PARAMETER_STRING); + temp->declare_parameter("max_steer_angle", rclcpp::PARAMETER_DOUBLE); + std::string n_dbw_dbc_file = temp->get_parameter("dbw_dbc_file").as_string(); float n_max_steer_angle = temp->get_parameter("max_steer_angle").as_double(); diff --git a/raptor_dbw_joystick/src/raptor_dbw_joystick_node.cpp b/raptor_dbw_joystick/src/raptor_dbw_joystick_node.cpp index ac6db8e..1b3e8db 100644 --- a/raptor_dbw_joystick/src/raptor_dbw_joystick_node.cpp +++ b/raptor_dbw_joystick/src/raptor_dbw_joystick_node.cpp @@ -39,10 +39,10 @@ int main(int argc, char ** argv) // Get parameter values auto temp = std::make_shared("get_joy_params_node", options); - temp->declare_parameter("ignore"); - temp->declare_parameter("enable"); - temp->declare_parameter("svel"); - temp->declare_parameter("max_steer_angle"); + temp->declare_parameter("ignore", rclcpp::PARAMETER_BOOL); + temp->declare_parameter("enable", rclcpp::PARAMETER_BOOL); + temp->declare_parameter("svel", rclcpp::PARAMETER_DOUBLE); + temp->declare_parameter("max_steer_angle", rclcpp::PARAMETER_DOUBLE); bool n_ignore = temp->get_parameter("ignore").as_bool(); bool n_enable = temp->get_parameter("enable").as_bool();