Typedefs | Functions | Variables
ros::param Namespace Reference

Contains functions which allow you to query the parameter server. More...

Typedefs

typedef std::map< std::string, XmlRpc::XmlRpcValueM_Param
 

Functions

ROSCPP_DECL bool del (const std::string &key)
 Delete a parameter from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::string &s)
 Get a string value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, double &d)
 Get a double value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, float &f)
 Get a float value from the parameter server (internally using the double value). More...
 
ROSCPP_DECL bool get (const std::string &key, int &i)
 Get an integer value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, bool &b)
 Get a boolean value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, XmlRpc::XmlRpcValue &v)
 Get an arbitrary XML/RPC value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::vector< std::string > &vec)
 Get a string vector value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::vector< double > &vec)
 Get a double vector value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::vector< float > &vec)
 Get a float vector value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::vector< int > &vec)
 Get an int vector value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::vector< bool > &vec)
 Get a bool vector value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::map< std::string, std::string > &map)
 Get a string->string map value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::map< std::string, double > &map)
 Get a string->double map value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::map< std::string, float > &map)
 Get a string->float map value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::map< std::string, int > &map)
 Get a string->int map value from the parameter server. More...
 
ROSCPP_DECL bool get (const std::string &key, std::map< std::string, bool > &map)
 Get a string->bool map value from the parameter server. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::string &s)
 Get a string value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, double &d)
 Get a double value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, float &f)
 Get a float value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, int &i)
 Get an integer value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, bool &b)
 Get a boolean value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, XmlRpc::XmlRpcValue &v)
 Get an arbitrary XML/RPC value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::vector< std::string > &vec)
 Get a string vector value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::vector< double > &vec)
 Get a double vector value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::vector< float > &vec)
 Get a float vector value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::vector< int > &vec)
 Get an int vector value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::vector< bool > &vec)
 Get a bool vector value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::map< std::string, std::string > &map)
 Get a string->string map value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::map< std::string, double > &map)
 Get a string->double map value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::map< std::string, float > &map)
 Get a string->float map value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::map< std::string, int > &map)
 Get a string->int map value from the parameter server, with local caching. More...
 
ROSCPP_DECL bool getCached (const std::string &key, std::map< std::string, bool > &map)
 Get a string->bool map value from the parameter server, with local caching. More...
 
bool getImpl (const std::string &key, XmlRpc::XmlRpcValue &v, bool use_cache)
 
bool getImpl (const std::string &key, std::string &s, bool use_cache)
 
bool getImpl (const std::string &key, double &d, bool use_cache)
 
bool getImpl (const std::string &key, float &f, bool use_cache)
 
bool getImpl (const std::string &key, int &i, bool use_cache)
 
bool getImpl (const std::string &key, bool &b, bool use_cache)
 
template<class T >
bool getImpl (const std::string &key, std::vector< T > &vec, bool cached)
 
template<class T >
bool getImpl (const std::string &key, std::map< std::string, T > &map, bool cached)
 
ROSCPP_DECL bool getParamNames (std::vector< std::string > &keys)
 Get the list of all the parameters in the server. More...
 
ROSCPP_DECL bool has (const std::string &key)
 Check whether a parameter exists on the parameter server. More...
 
void init (const M_string &remappings)
 
void invalidateParentParams (const std::string &key)
 
template<typename T >
bool param (const std::string &param_name, T &param_val, const T &default_val)
 Assign value from parameter server, with default. More...
 
template<typename T >
param (const std::string &param_name, const T &default_val)
 Return value from parameter server, or default if unavailable. More...
 
void paramUpdateCallback (XmlRpc::XmlRpcValue &params, XmlRpc::XmlRpcValue &result)
 
ROSCPP_DECL bool search (const std::string &ns, const std::string &key, std::string &result)
 Search up the tree for a parameter with a given key. More...
 
ROSCPP_DECL bool search (const std::string &key, std::string &result)
 Search up the tree for a parameter with a given key. This version defaults to starting in the current node's name. More...
 
ROSCPP_DECL void set (const std::string &key, const XmlRpc::XmlRpcValue &v)
 Set an arbitrary XML/RPC value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::string &s)
 Set a string value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const char *s)
 Set a string value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, double d)
 Set a double value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, int i)
 Set an integer value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, bool b)
 Set a bool value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::vector< std::string > &vec)
 Set a string vector value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::vector< double > &vec)
 Set a double vector value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::vector< float > &vec)
 Set a float vector value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::vector< int > &vec)
 Set an integer vector value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::vector< bool > &vec)
 Set a bool vector value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::map< std::string, std::string > &map)
 Set a string->string map value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::map< std::string, double > &map)
 Set a string->double map value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::map< std::string, float > &map)
 Set a string->float map value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::map< std::string, int > &map)
 Set a string->int map value on the parameter server. More...
 
ROSCPP_DECL void set (const std::string &key, const std::map< std::string, bool > &map)
 Set a string->bool map value on the parameter server. More...
 
template<class T >
void setImpl (const std::string &key, const std::vector< T > &vec)
 
template<class T >
void setImpl (const std::string &key, const std::map< std::string, T > &map)
 
void update (const std::string &key, const XmlRpc::XmlRpcValue &v)
 
template<class T >
xml_cast (XmlRpc::XmlRpcValue xml_value)
 
template<>
double xml_cast (XmlRpc::XmlRpcValue xml_value)
 
template<>
float xml_cast (XmlRpc::XmlRpcValue xml_value)
 
template<>
int xml_cast (XmlRpc::XmlRpcValue xml_value)
 
template<>
bool xml_cast (XmlRpc::XmlRpcValue xml_value)
 
template<class T >
bool xml_castable (int XmlType)
 
template<>
bool xml_castable< bool > (int XmlType)
 
template<>
bool xml_castable< double > (int XmlType)
 
template<>
bool xml_castable< float > (int XmlType)
 
template<>
bool xml_castable< int > (int XmlType)
 
template<>
bool xml_castable< std::string > (int XmlType)
 

Variables

M_Param g_params
 
boost::mutex g_params_mutex
 
S_string g_subscribed_params
 

Detailed Description

Contains functions which allow you to query the parameter server.

Typedef Documentation

◆ M_Param

typedef std::map<std::string, XmlRpc::XmlRpcValue> ros::param::M_Param

Definition at line 48 of file param.cpp.

Function Documentation

◆ del()

bool ros::param::del ( const std::string &  key)

Delete a parameter from the parameter server.

Parameters
keyThe key to delete.
Returns
true if the deletion succeeded, false otherwise.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 228 of file param.cpp.

◆ get() [1/16]

bool ros::param::get ( const std::string &  key,
std::string &  s 
)

Get a string value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]sStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 405 of file param.cpp.

◆ get() [2/16]

bool ros::param::get ( const std::string &  key,
double &  d 
)

Get a double value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]dStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 410 of file param.cpp.

◆ get() [3/16]

bool ros::param::get ( const std::string &  key,
float &  f 
)

Get a float value from the parameter server (internally using the double value).

Parameters
keyThe key to be used in the parameter server's dictionary
[out]fStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 415 of file param.cpp.

◆ get() [4/16]

bool ros::param::get ( const std::string &  key,
int &  i 
)

Get an integer value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]iStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 420 of file param.cpp.

◆ get() [5/16]

bool ros::param::get ( const std::string &  key,
bool &  b 
)

Get a boolean value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]bStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 425 of file param.cpp.

◆ get() [6/16]

bool ros::param::get ( const std::string &  key,
XmlRpc::XmlRpcValue v 
)

Get an arbitrary XML/RPC value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 430 of file param.cpp.

◆ get() [7/16]

bool ros::param::get ( const std::string &  key,
std::vector< std::string > &  vec 
)

Get a string vector value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 600 of file param.cpp.

◆ get() [8/16]

bool ros::param::get ( const std::string &  key,
std::vector< double > &  vec 
)

Get a double vector value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 604 of file param.cpp.

◆ get() [9/16]

bool ros::param::get ( const std::string &  key,
std::vector< float > &  vec 
)

Get a float vector value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 608 of file param.cpp.

◆ get() [10/16]

bool ros::param::get ( const std::string &  key,
std::vector< int > &  vec 
)

Get an int vector value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 612 of file param.cpp.

◆ get() [11/16]

bool ros::param::get ( const std::string &  key,
std::vector< bool > &  vec 
)

Get a bool vector value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 616 of file param.cpp.

◆ get() [12/16]

bool ros::param::get ( const std::string &  key,
std::map< std::string, std::string > &  map 
)

Get a string->string map value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 671 of file param.cpp.

◆ get() [13/16]

bool ros::param::get ( const std::string &  key,
std::map< std::string, double > &  map 
)

Get a string->double map value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 675 of file param.cpp.

◆ get() [14/16]

bool ros::param::get ( const std::string &  key,
std::map< std::string, float > &  map 
)

Get a string->float map value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 679 of file param.cpp.

◆ get() [15/16]

bool ros::param::get ( const std::string &  key,
std::map< std::string, int > &  map 
)

Get a string->int map value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 683 of file param.cpp.

◆ get() [16/16]

bool ros::param::get ( const std::string &  key,
std::map< std::string, bool > &  map 
)

Get a string->bool map value from the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 687 of file param.cpp.

◆ getCached() [1/16]

bool ros::param::getCached ( const std::string &  key,
std::string &  s 
)

Get a string value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]sStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 435 of file param.cpp.

◆ getCached() [2/16]

bool ros::param::getCached ( const std::string &  key,
double &  d 
)

Get a double value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]dStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 440 of file param.cpp.

◆ getCached() [3/16]

bool ros::param::getCached ( const std::string &  key,
float &  f 
)

Get a float value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]fStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 445 of file param.cpp.

◆ getCached() [4/16]

bool ros::param::getCached ( const std::string &  key,
int &  i 
)

Get an integer value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]iStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 450 of file param.cpp.

◆ getCached() [5/16]

bool ros::param::getCached ( const std::string &  key,
bool &  b 
)

Get a boolean value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]bStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 455 of file param.cpp.

◆ getCached() [6/16]

bool ros::param::getCached ( const std::string &  key,
XmlRpc::XmlRpcValue v 
)

Get an arbitrary XML/RPC value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 460 of file param.cpp.

◆ getCached() [7/16]

bool ros::param::getCached ( const std::string &  key,
std::vector< std::string > &  vec 
)

Get a string vector value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 621 of file param.cpp.

◆ getCached() [8/16]

bool ros::param::getCached ( const std::string &  key,
std::vector< double > &  vec 
)

Get a double vector value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 625 of file param.cpp.

◆ getCached() [9/16]

bool ros::param::getCached ( const std::string &  key,
std::vector< float > &  vec 
)

Get a float vector value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 629 of file param.cpp.

◆ getCached() [10/16]

bool ros::param::getCached ( const std::string &  key,
std::vector< int > &  vec 
)

Get an int vector value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 633 of file param.cpp.

◆ getCached() [11/16]

bool ros::param::getCached ( const std::string &  key,
std::vector< bool > &  vec 
)

Get a bool vector value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]vecStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 637 of file param.cpp.

◆ getCached() [12/16]

bool ros::param::getCached ( const std::string &  key,
std::map< std::string, std::string > &  map 
)

Get a string->string map value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 692 of file param.cpp.

◆ getCached() [13/16]

bool ros::param::getCached ( const std::string &  key,
std::map< std::string, double > &  map 
)

Get a string->double map value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 696 of file param.cpp.

◆ getCached() [14/16]

bool ros::param::getCached ( const std::string &  key,
std::map< std::string, float > &  map 
)

Get a string->float map value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 700 of file param.cpp.

◆ getCached() [15/16]

bool ros::param::getCached ( const std::string &  key,
std::map< std::string, int > &  map 
)

Get a string->int map value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 704 of file param.cpp.

◆ getCached() [16/16]

bool ros::param::getCached ( const std::string &  key,
std::map< std::string, bool > &  map 
)

Get a string->bool map value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master – they will instead look up in the local cache.

Parameters
keyThe key to be used in the parameter server's dictionary
[out]mapStorage for the retrieved value.
Returns
true if the parameter value was retrieved, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 708 of file param.cpp.

◆ getImpl() [1/8]

bool ros::param::getImpl ( const std::string &  key,
XmlRpc::XmlRpcValue v,
bool  use_cache 
)

Definition at line 253 of file param.cpp.

◆ getImpl() [2/8]

bool ros::param::getImpl ( const std::string &  key,
std::string &  s,
bool  use_cache 
)

Definition at line 315 of file param.cpp.

◆ getImpl() [3/8]

bool ros::param::getImpl ( const std::string &  key,
double &  d,
bool  use_cache 
)

Definition at line 326 of file param.cpp.

◆ getImpl() [4/8]

bool ros::param::getImpl ( const std::string &  key,
float &  f,
bool  use_cache 
)

Definition at line 350 of file param.cpp.

◆ getImpl() [5/8]

bool ros::param::getImpl ( const std::string &  key,
int &  i,
bool  use_cache 
)

Definition at line 359 of file param.cpp.

◆ getImpl() [6/8]

bool ros::param::getImpl ( const std::string &  key,
bool &  b,
bool  use_cache 
)

Definition at line 394 of file param.cpp.

◆ getImpl() [7/8]

template<class T >
bool ros::param::getImpl ( const std::string &  key,
std::vector< T > &  vec,
bool  cached 
)

Definition at line 573 of file param.cpp.

◆ getImpl() [8/8]

template<class T >
bool ros::param::getImpl ( const std::string &  key,
std::map< std::string, T > &  map,
bool  cached 
)

Definition at line 643 of file param.cpp.

◆ getParamNames()

bool ros::param::getParamNames ( std::vector< std::string > &  keys)

Get the list of all the parameters in the server.

Parameters
keysThe vector of all the keys
Returns
false if the process fails

Definition at line 713 of file param.cpp.

◆ has()

bool ros::param::has ( const std::string &  key)

Check whether a parameter exists on the parameter server.

Parameters
keyThe key to check.
Returns
true if the parameter exists, false otherwise
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 211 of file param.cpp.

◆ init()

void ros::param::init ( const M_string remappings)

Definition at line 800 of file param.cpp.

◆ invalidateParentParams()

void ros::param::invalidateParentParams ( const std::string &  key)

Definition at line 53 of file param.cpp.

◆ param() [1/2]

template<typename T >
bool ros::param::param ( const std::string &  param_name,
T &  param_val,
const T &  default_val 
)

Assign value from parameter server, with default.

This method tries to retrieve the indicated parameter value from the parameter server, storing the result in param_val. If the value cannot be retrieved from the server, default_val is used instead.

Parameters
param_nameThe key to be searched on the parameter server.
[out]param_valStorage for the retrieved value.
default_valValue to use if the server doesn't contain this parameter.
Returns
true if the parameter was retrieved from the server, false otherwise.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 608 of file param.h.

◆ param() [2/2]

template<typename T >
T ros::param::param ( const std::string &  param_name,
const T &  default_val 
)

Return value from parameter server, or default if unavailable.

This method tries to retrieve the indicated parameter value from the parameter server. If the parameter cannot be retrieved, default_val is returned instead.

Parameters
param_nameThe key to be searched on the parameter server.
default_valValue to return if the server doesn't contain this parameter.
Returns
The parameter value retrieved from the parameter server, or default_val if unavailable.
Exceptions
InvalidNameExceptionIf the key is not a valid graph resource name.

Definition at line 640 of file param.h.

◆ paramUpdateCallback()

void ros::param::paramUpdateCallback ( XmlRpc::XmlRpcValue params,
XmlRpc::XmlRpcValue result 
)

Definition at line 791 of file param.cpp.

◆ search() [1/2]

bool ros::param::search ( const std::string &  ns,
const std::string &  key,
std::string &  result 
)

Search up the tree for a parameter with a given key.

This function parameter server's searchParam feature to search up the tree for a parameter. For example, if the parameter server has a parameter [/a/b] and you specify the namespace [/a/c/d], searching for the parameter "b" will yield [/a/b]. If [/a/c/d/b] existed, that parameter would be returned instead.

Parameters
nsThe namespace to begin the search in
keythe parameter to search for
[out]resultthe found value (if any)
Returns
true if the parameter was found, false otherwise.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 748 of file param.cpp.

◆ search() [2/2]

bool ros::param::search ( const std::string &  key,
std::string &  result 
)

Search up the tree for a parameter with a given key. This version defaults to starting in the current node's name.

This function parameter server's searchParam feature to search up the tree for a parameter. For example, if the parameter server has a parameter [/a/b] and you specify the namespace [/a/c/d], searching for the parameter "b" will yield [/a/b]. If [/a/c/d/b] existed, that parameter would be returned instead.

Parameters
keythe parameter to search for
[out]resultthe found value (if any)
Returns
true if the parameter was found, false otherwise.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 743 of file param.cpp.

◆ set() [1/16]

void ros::param::set ( const std::string &  key,
const XmlRpc::XmlRpcValue v 
)

Set an arbitrary XML/RPC value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
vThe value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 67 of file param.cpp.

◆ set() [2/16]

void ros::param::set ( const std::string &  key,
const std::string &  s 
)

Set a string value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
sThe value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 94 of file param.cpp.

◆ set() [3/16]

void ros::param::set ( const std::string &  key,
const char *  s 
)

Set a string value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
sThe value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 102 of file param.cpp.

◆ set() [4/16]

void ros::param::set ( const std::string &  key,
double  d 
)

Set a double value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
dThe value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 111 of file param.cpp.

◆ set() [5/16]

void ros::param::set ( const std::string &  key,
int  i 
)

Set an integer value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
iThe value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 117 of file param.cpp.

◆ set() [6/16]

void ros::param::set ( const std::string &  key,
bool  b 
)

Set a bool value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
bThe value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 123 of file param.cpp.

◆ set() [7/16]

void ros::param::set ( const std::string &  key,
const std::vector< std::string > &  vec 
)

Set a string vector value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
vecThe vector value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 145 of file param.cpp.

◆ set() [8/16]

void ros::param::set ( const std::string &  key,
const std::vector< double > &  vec 
)

Set a double vector value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
vecThe vector value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 150 of file param.cpp.

◆ set() [9/16]

void ros::param::set ( const std::string &  key,
const std::vector< float > &  vec 
)

Set a float vector value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
vecThe vector value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 155 of file param.cpp.

◆ set() [10/16]

void ros::param::set ( const std::string &  key,
const std::vector< int > &  vec 
)

Set an integer vector value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
vecThe vector value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 160 of file param.cpp.

◆ set() [11/16]

void ros::param::set ( const std::string &  key,
const std::vector< bool > &  vec 
)

Set a bool vector value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
vecThe vector value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 165 of file param.cpp.

◆ set() [12/16]

void ros::param::set ( const std::string &  key,
const std::map< std::string, std::string > &  map 
)

Set a string->string map value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
mapThe map value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 186 of file param.cpp.

◆ set() [13/16]

void ros::param::set ( const std::string &  key,
const std::map< std::string, double > &  map 
)

Set a string->double map value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
mapThe map value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 191 of file param.cpp.

◆ set() [14/16]

void ros::param::set ( const std::string &  key,
const std::map< std::string, float > &  map 
)

Set a string->float map value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
mapThe map value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 196 of file param.cpp.

◆ set() [15/16]

void ros::param::set ( const std::string &  key,
const std::map< std::string, int > &  map 
)

Set a string->int map value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
mapThe map value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 201 of file param.cpp.

◆ set() [16/16]

void ros::param::set ( const std::string &  key,
const std::map< std::string, bool > &  map 
)

Set a string->bool map value on the parameter server.

Parameters
keyThe key to be used in the parameter server's dictionary
mapThe map value to be inserted.
Exceptions
InvalidNameExceptionif the key is not a valid graph resource name

Definition at line 206 of file param.cpp.

◆ setImpl() [1/2]

template<class T >
void ros::param::setImpl ( const std::string &  key,
const std::vector< T > &  vec 
)

Definition at line 130 of file param.cpp.

◆ setImpl() [2/2]

template<class T >
void ros::param::setImpl ( const std::string &  key,
const std::map< std::string, T > &  map 
)

Definition at line 171 of file param.cpp.

◆ update()

void ros::param::update ( const std::string &  key,
const XmlRpc::XmlRpcValue v 
)

Definition at line 777 of file param.cpp.

◆ xml_cast() [1/5]

template<class T >
T ros::param::xml_cast ( XmlRpc::XmlRpcValue  xml_value)

Definition at line 465 of file param.cpp.

◆ xml_cast() [2/5]

template<>
double ros::param::xml_cast ( XmlRpc::XmlRpcValue  xml_value)

Definition at line 512 of file param.cpp.

◆ xml_cast() [3/5]

template<>
float ros::param::xml_cast ( XmlRpc::XmlRpcValue  xml_value)

Definition at line 527 of file param.cpp.

◆ xml_cast() [4/5]

template<>
int ros::param::xml_cast ( XmlRpc::XmlRpcValue  xml_value)

Definition at line 542 of file param.cpp.

◆ xml_cast() [5/5]

template<>
bool ros::param::xml_cast ( XmlRpc::XmlRpcValue  xml_value)

Definition at line 557 of file param.cpp.

◆ xml_castable()

template<class T >
bool ros::param::xml_castable ( int  XmlType)

Definition at line 470 of file param.cpp.

◆ xml_castable< bool >()

template<>
bool ros::param::xml_castable< bool > ( int  XmlType)

Definition at line 504 of file param.cpp.

◆ xml_castable< double >()

template<>
bool ros::param::xml_castable< double > ( int  XmlType)

Definition at line 480 of file param.cpp.

◆ xml_castable< float >()

template<>
bool ros::param::xml_castable< float > ( int  XmlType)

Definition at line 488 of file param.cpp.

◆ xml_castable< int >()

template<>
bool ros::param::xml_castable< int > ( int  XmlType)

Definition at line 496 of file param.cpp.

◆ xml_castable< std::string >()

template<>
bool ros::param::xml_castable< std::string > ( int  XmlType)

Definition at line 475 of file param.cpp.

Variable Documentation

◆ g_params

M_Param ros::param::g_params

Definition at line 49 of file param.cpp.

◆ g_params_mutex

boost::mutex ros::param::g_params_mutex

Definition at line 50 of file param.cpp.

◆ g_subscribed_params

S_string ros::param::g_subscribed_params

Definition at line 51 of file param.cpp.



roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim
autogenerated on Sat Aug 22 2020 03:23:13