motion_stack.ros2 package

ROS2 specific API and nodes, for the motion stack core.

Links ROS2 systems and and the pure pyhton core. Timer, Messages, Publisher, Subscription … all of those ROS2 tools are created here then executes functions of the core.

Warning

Non-ROS2-related opertation must NOT be implemented here.

Subpackages

Submodules

motion_stack.ros2.communication module

Holds ros2 communication interface data.

It provides the names, types and QoS of every interface – topics, services, actions – used by the motion stack.

No need to remember the right name with the right spelling, type, QoS throughout your code. Simply import this and use communication.lvl1.output.joint_state.name to get joint_read

The user can possibly change those settings (especially QoS) if he understands the implcations. By default the most unversal setting QoS is used.

motion_stack.ros2.communication.limb_ns(limb_number)[source]
Parameters:

limb_number – Number of the limb

Returns:

Namespace of the limb.

Return type:

str

namedtuple motion_stack.ros2.communication.Interf(type, name, qos=<rclpy.qos.QoSProfile object>)[source]

Bases: NamedTuple

Ros2 interface class with type and name

Fields:
  1.  type (Type) – Alias for field number 0

  2.  name (str) – Alias for field number 1

  3.  qos (QoSProfile) – Alias for field number 2

class motion_stack.ros2.communication.lvl1[source]

Bases: object

alive = (<class 'std_srvs.srv._empty.Empty'>, 'joint_alive', <rclpy.qos.QoSProfile object>)

Type:    Interf

class output[source]

Bases: object

motor_command = (<class 'sensor_msgs.msg._joint_state.JointState'>, 'joint_commands', <rclpy.qos.QoSProfile object>)

Type:    Interf

joint_state = (<class 'sensor_msgs.msg._joint_state.JointState'>, 'joint_read', <rclpy.qos.QoSProfile object>)

Type:    Interf

advertise = (<class 'motion_stack_msgs.srv._return_joint_state.ReturnJointState'>, 'advertise_joints', <rclpy.qos.QoSProfile object>)

Type:    Interf

class input[source]

Bases: object

motor_sensor = (<class 'sensor_msgs.msg._joint_state.JointState'>, 'joint_states', <rclpy.qos.QoSProfile object>)

Type:    Interf

joint_target = (<class 'sensor_msgs.msg._joint_state.JointState'>, 'joint_set', <rclpy.qos.QoSProfile object>)

Type:    Interf

class motion_stack.ros2.communication.lvl2[source]

Bases: object

alive = (<class 'std_srvs.srv._empty.Empty'>, 'ik_alive', <rclpy.qos.QoSProfile object>)

Type:    Interf

class output[source]

Bases: object

joint_target = (<class 'sensor_msgs.msg._joint_state.JointState'>, 'joint_set', <rclpy.qos.QoSProfile object>)

Type:    Interf

tip_pos = (<class 'geometry_msgs.msg._transform.Transform'>, 'tip_pos', <rclpy.qos.QoSProfile object>)

Type:    Interf

class input[source]

Bases: object

joint_state = (<class 'sensor_msgs.msg._joint_state.JointState'>, 'joint_read', <rclpy.qos.QoSProfile object>)

Type:    Interf

set_ik = (<class 'geometry_msgs.msg._transform.Transform'>, 'set_ik_target', <rclpy.qos.QoSProfile object>)

Type:    Interf