moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
moveit.policies.policy.Policy Class Reference
Inheritance diagram for moveit.policies.policy.Policy:
Collaboration diagram for moveit.policies.policy.Policy:

Public Member Functions

 __init__ (self, params, node_name="policy_node")
 is_active (self)
 active (self, value)
 activate_policy (self, request, response)
 get_sensor_msg_type (self, msg_type)
 get_command_msg_type (self, msg_type)
 register_sensors (self)
 register_command (self)
 forward ()

Public Attributes

 logger = self.get_logger()
 param_listener = params.ParamListener(self)
 params = self.param_listener.get_params()
 activate_policy_service
list sensor_subs = []
 sensor_sync
 forward
 command_pub

Protected Attributes

bool _is_active = False

Detailed Description

An abstract base class for deploying learnt policies.

Definition at line 54 of file policy.py.

Constructor & Destructor Documentation

◆ __init__()

moveit.policies.policy.Policy.__init__ ( self,
params,
node_name = "policy_node" )
Initialise the policy.

Definition at line 57 of file policy.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ activate_policy()

moveit.policies.policy.Policy.activate_policy ( self,
request,
response )
Sets the policy to active state via ROS interface.

Definition at line 90 of file policy.py.

◆ active()

moveit.policies.policy.Policy.active ( self,
value )
Sets the policy to active state via Python API.

Definition at line 86 of file policy.py.

◆ forward()

moveit.policies.policy.Policy.forward ( )
Perform a forward pass of the policy.

Definition at line 148 of file policy.py.

◆ get_command_msg_type()

moveit.policies.policy.Policy.get_command_msg_type ( self,
msg_type )
Returns the ROS 2 message type for a given command type.

Definition at line 102 of file policy.py.

◆ get_sensor_msg_type()

moveit.policies.policy.Policy.get_sensor_msg_type ( self,
msg_type )
Returns the ROS 2 message type for a given sensor type.

Definition at line 95 of file policy.py.

◆ is_active()

moveit.policies.policy.Policy.is_active ( self)
Returns True if the policy is active.

Definition at line 81 of file policy.py.

◆ register_command()

moveit.policies.policy.Policy.register_command ( self)
Register the topic to publish actions to.

Definition at line 139 of file policy.py.

◆ register_sensors()

moveit.policies.policy.Policy.register_sensors ( self)
Register the topics to listen to for sensor data.

Definition at line 113 of file policy.py.

Member Data Documentation

◆ _is_active

bool moveit.policies.policy.Policy._is_active = False
protected

Definition at line 67 of file policy.py.

◆ activate_policy_service

moveit.policies.policy.Policy.activate_policy_service
Initial value:
= self.create_service(
SetBool,
"activate_policy",
self.activate_policy,
)

Definition at line 68 of file policy.py.

◆ command_pub

moveit.policies.policy.Policy.command_pub
Initial value:
= self.create_publisher(
self.get_command_msg_type(self.params.command.type),
self.params.command.topic,
QoSProfile(depth=self.params.command.qos),
)

Definition at line 141 of file policy.py.

◆ forward

moveit.policies.policy.Policy.forward

Definition at line 137 of file policy.py.

◆ logger

moveit.policies.policy.Policy.logger = self.get_logger()

Definition at line 60 of file policy.py.

◆ param_listener

moveit.policies.policy.Policy.param_listener = params.ParamListener(self)

Definition at line 63 of file policy.py.

◆ params

moveit.policies.policy.Policy.params = self.param_listener.get_params()

Definition at line 64 of file policy.py.

◆ sensor_subs

list moveit.policies.policy.Policy.sensor_subs = []

Definition at line 115 of file policy.py.

◆ sensor_sync

moveit.policies.policy.Policy.sensor_sync
Initial value:
= message_filters.ApproximateTimeSynchronizer(
self.sensor_subs,
self.params.sensor_queue,
self.params.sensor_slop,
)

Definition at line 130 of file policy.py.


The documentation for this class was generated from the following file: