Default ROS2 nodes provided by the motion stack.
Created using ros2.base_node as the API.
Once you understand the API, feel free to overwrite methods of these default nodes in your own class. With this you can change or add behaviors.
Bases: Lvl1Node
Default implementation of the Joint node of lvl1.
Refer to ros2.base_node.lvl1 for documentation on linking ros2 and python core of lvl1. This only makes use of this base to create the default implementation and give an example.
Publishers:
| Topic | Type | Note |
|---|---|---|
| joint_commands | JointState | sent to motors (lvl0) |
| joint_read | JointState | sent to IK (lvl2) |
Subscribers:
| Topic | Type | Note |
|---|---|---|
| joint_states | JointState | coming from sensors (lvl0) |
| joint_set | JointState | coming from IK (lvl2) |
Service server:
| Topic | Type | Note |
|---|---|---|
| advertise_joints | ReturnJointState | JointState with the name of all joints |
Timers:
: - Sends to lvl2, freq.= ROS2_PARAMETER[mvmt_update_rate].
Startup: : - Sends empty message to lvl0 with only joint names.
Type: Interf
- Parameters: lvl2_input (Callable [ *[*List [JState ] ] , Any ])
- Parameters: lvl0_input (Callable [ *[*List [JState ] ] , Any ])
- Parameters: states (List [JState ])
- Parameters: states (List [JState ])
- Parameters: send_function (Callable [ [ ] , None ])
- Parameters: core (JointCore)
Creates the advertise_joints service and its callback.
Callback returns a ReturnJointState.Response wich is a JointState with the name of all joints managed by the node. Other field of JointState are not meant to be used, but are filled with the latest data.
- Parameters:
- node (Node) – spinning node
- lvl1 (JointCore) – lvl1 core
Bases: Lvl2Node
Default implementation of the Joint node of lvl2.
Refer to ros2.base_node.lvl2.Lvl2Node for documentation on linking ros2 and python core of lvl1. This only makes use of this base to create the default implementation and give an example.
Type: Interf
- Parameters: lvl1_input (Callable [ *[*List [JState ] ] , Any ])
- Parameters: lvl3_input (Callable [ [Pose ] , Any ])
- Parameters: states (List [JState ])
- Parameters: pose (Pose)
- Parameters: lvl2 (IKCore)
Bases: Node
- Return type:
None - Parameters: jsMSG (JointState)
- Return type:
None - Parameters: state (JState)
- Return type:
None - Parameters: names (List *[*str ] | None)
- Return type:
None - Parameters: names (List *[*str ] | None)
- Return type:
bool - Parameters: js (JState)
- Return type:
List[str]
Bases: Node
- Parameters: n (int)
- Parameters: samples (int)