Node that can run both with and without a ROS master. This can be useful for one-off scripts that do not need to publish or subscribe anything, but they want to make use of the parameter processing and name remapping.
More...
|
::cras::BoundParamHelperPtr | getPrivateParams () const |
| Get private parameters of the node. More...
|
|
void | init (const ::ros::M_string &remappings, const ::std::string &name, uint32_t options) |
| Initialize the node, autodetecting whether a ros master is running or not. More...
|
|
void | init (const ::ros::VP_string &remappings, const ::std::string &name, uint32_t options) |
| Initialize the node, autodetecting whether a ros master is running or not. More...
|
|
void | init (int &argc, char **argv, const ::std::string &name, uint32_t options) |
| Initialize the node, autodetecting whether a ros master is running or not. More...
|
|
bool | isInitialized () const |
| Has init() been called? More...
|
|
| NodeWithOptionalMaster (const ::cras::LogHelperPtr &log) |
|
bool | ok () const |
| Equivalent of ros::ok() . More...
|
|
::std::string | resolveName (const ::std::string &name, bool remap=true) const |
| Resolve a name relative to the global namespace. More...
|
|
void | shutdown () |
| Shutdown the node. More...
|
|
bool | usesMaster () const |
| Is a live ROS master being used? More...
|
|
virtual | ~NodeWithOptionalMaster () |
|
::cras::LogHelperConstPtr | getCrasLogger () const |
| This is the function picked up by CRAS_* logging macros. More...
|
|
| HasLogger (const ::cras::LogHelperPtr &log) |
| Associate the logger with this interface. More...
|
|
void | setCrasLogger (const ::cras::LogHelperPtr &log) |
| Set the logger to be used for logging. More...
|
|
Node that can run both with and without a ROS master. This can be useful for one-off scripts that do not need to publish or subscribe anything, but they want to make use of the parameter processing and name remapping.
This class provides an interface similar to ros::NodeHandle. However, when init() is called, it first checks whether the rosmaster is running and can be contacted. If not, this class falls back to a mode with no master. It will still provide parameters and name resolving, however, only for the parameters and remaps directly specified when launching the node. When running without master, simulation time is never used.
Definition at line 33 of file node_with_optional_master.h.