Members
(static) ActionClient
ActionClient class
(static) ActionServer
ActionServer class
(static) CancelResponse
ServerGoalHandle enum
(static) ClientGoalHandle
ClientGoalHandle class
(static) Clock
Clock class
(static) ClockType
ClockType enum
(static) Context
Context class
(static) Duration
Duration class
(static) FloatingPointRange
FloatingPointRange class
(static) getActionClientNamesAndTypesByNode
getActionClientNamesAndTypesByNode function
(static) getActionNamesAndTypes
getActionNamesAndTypes function
(static) getActionServerNamesAndTypesByNode
getActionServerNamesAndTypesByNode function
(static) GoalResponse
GoalResponse enum
(static) IntegerRange
IntegerRange class
(static) logging
Logging class
(static) NodeOptions
NodeOptions class
(static) Parameter
(static) ParameterDescriptor
(static) ParameterType
(static) QoS
QoS class
(static) ROSClock
ROSClock class
(static) ServerGoalHandle
ServerGoalHandle class
(static) Time
Time class
(static) TimeSource
TimeSource class
(static) validator
validator object
(inner, constant) The :number
plus/minus tolerance for determining number equivalence.
Type:
- number
- Source:
- See:
Methods
(static) createMessageObject(type) → {Object|undefined}
Create a plain JavaScript by specified type identifier
Parameters:
Name | Type | Description |
---|---|---|
type |
string | Object | - the type identifier, acceptable formats could be 'std_msgs/std/String' or {package: 'std_msgs', type: 'msg', name: 'String'} |
Returns:
A plain JavaScript of that type
- Type
- Object | undefined
(static) createNode(nodeName, namespace, context, options) → {Node}
Create a node.
Parameters:
Name | Type | Description |
---|---|---|
nodeName |
string | The name used to register in ROS. |
namespace |
string | The namespace used in ROS, default is an empty string. |
context |
Context | The context, default is Context.defaultContext(). |
options |
NodeOptions | The options to configure the new node behavior. |
Returns:
The instance of Node.
- Type
- Node
(static) expandTopicName(topicName, nodeName, nodeNamespace) → {string}
Expand a given topic name using given node name and namespace as well.
Parameters:
Name | Type | Description |
---|---|---|
topicName |
string | Topic name to be expanded. |
nodeName |
string | Name of the node that this topic is associated with. |
nodeNamespace |
string | Namespace that the topic is within. |
Returns:
Expanded topic name which is fully qualified.
- Type
- string
(static) init(context, argv) → {Promise.<undefined>}
Init the module.
Parameters:
Name | Type | Description |
---|---|---|
context |
Context | The context, default is Context.defaultContext(). |
argv |
Array.<string> | Process commandline arguments. |
Returns:
A Promise.
- Type
- Promise.<undefined>
(static) isShutdown() → {boolean}
Return status that whether the module is shut down.
Returns:
Return true if the module is shut down, otherwise return false.
- Type
- boolean
(static) isTopicOrServiceHidden(name) → {boolean}
Judge if the topic/service is hidden, see http://design.ros2.org/articles/topic_and_service_names.html#hidden-topic-or-service-names
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of topic/service. |
Returns:
- True if a given topic or service name is hidden, otherwise False.
- Type
- boolean
(static) regenerateAll() → {Promise.<undefined>}
Search packgaes which locate under path $AMENT_PREFIX_PATH, regenerate all JavaScript structs files from the IDL of
messages(.msg) and services(.srv) and put these files under folder 'generated'. Any existing files under
this folder will be overwritten after the execution.
Returns:
A Promise.
- Type
- Promise.<undefined>
(static) require(name) → {object}
Get the interface package, which is used by publisher/subscription or client/service.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of interface to be required. |
Returns:
- the object of the required package/interface.
- Type
- object
(static) shutdown(context) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
context |
Context | The context to be shutdown. |
Returns:
- Type
- undefined
(static) spin(node, timeoutopt) → {undefined}
Start to spin the node, which triggers the event loop to start to check the incoming events.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
node |
Node | The node to be spun. | ||
timeout |
number |
<optional> |
10 | ms to wait, block forever if negative, don't wait if 0, default is 10. |
Returns:
- Type
- undefined
(static) spinOnce(node, timeoutopt) → {undefined}
Execute one item of work or wait until a timeout expires.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
node |
Node | The node to be spun. | ||
timeout |
number |
<optional> |
10 | ms to wait, block forever if negative, don't wait if 0, default is 10. |
Returns:
- Type
- undefined