py_trees_ros_viewer.conversions module

Demo trees to feed to the web app

py_trees_ros_viewer.conversions.msg_constant_to_behaviour_str(value: int) str

Convert one of the behaviour type constants in a py_trees_ros_interfaces.msg.Behaviour message to a human readable string.

Args:

value: see the message definition for details

Returns:

the bheaviour class type as a string (e.g. ‘Sequence’)

Raises:

TypeError: if the message type is unrecognised

py_trees_ros_viewer.conversions.msg_constant_to_status_str(value: int) str

Convert one of the status constants in a py_trees_ros_interfaces.msg.Behaviour message to a human readable string.

Args:

value: see the message definition for details

Returns:

status as a string (‘Invalid’, ‘Failure’, ‘Running’, ‘Success’)

Raises:

TypeError: if the status type is unrecognised

py_trees_ros_viewer.conversions.msg_to_uuid4(msg: unique_identifier_msgs.msg.UUID) UUID

Convert a uuid4 python object to a ros unique identifier, UUID type.

Args:

msg: the ros message type

Returns:

the behaviour’s uuid, python style