utils

Some helper functions to load and configure ROS params.

namespace slope_constrained_planner

Functions

template<typename T>
inline T getParamWithDefaultWarning(const ros::NodeHandle &nh, const std::string &name, const T &default_val)

Gets an specific ROS param name and sets its default value in a node handler.

Parameters:
  • nh – Node handler

  • name – Param’s name

  • default_val – Param’s default value

template<>
inline unsigned int getParamWithDefaultWarning<unsigned int>(const ros::NodeHandle &nh, const std::string &name, const unsigned int &default_val)

Gets an specific ROS param name and sets its default value in a node handler.

Parameters:
  • nh – Node handler

  • name – Param’s name

  • default_val – Param’s default value

ParamsPtr loadRosParameters(const ros::NodeHandle &nh)

Gets the provided params in config directory and sets them in the node handler using getParamWithDefaultWarning(nh, name, default_val) funciton.

Parameters:

nh – Node handler