Provides an interface to process TaxelArrays published on multiple topics, including trimming the data and transforming the reference frame. More...
Public Member Functions | |
def | __init__ |
Constructor. | |
def | addSkinTopic |
Add skin topic to internal data structures. | |
def | addSkinTopicCallback |
Callback function which sets the topic. | |
def | getContactLocationsFromTaxelArray |
def | getSkinData |
getSkinData accessor function Returns a copy of the skin_data dictionary | |
def | getTaxelLocationAndJointList |
Returns a list of taxel locations and list of joint numbers after which the joint torque will have no effect on the contact force, and optionally a time stamp Must be implemented by every robot specific skin client. | |
def | getTrimmedSkinData |
getTrimmedSkinData accessor function Returns a copy of the trimmed_skin_data dictionary | |
def | removeSkinTopic |
Remove skin topic from internal data structures. | |
def | removeSkinTopicCallback |
Callback function to removed skin topic. | |
def | setTrimThreshold |
Set the trim threshold used by the client. | |
def | skinCallback |
Skin Callback. | |
def | transformTaxelArray |
Transform a single taxel array message from one frame to another. | |
def | trimSkinContacts |
Return a trimmed copy of the the skin_data dictionary. | |
def | trimTaxelArray |
Trim a passed TaxelArray to only incorporate forces of significance. | |
Public Attributes | |
current_topics_pub | |
Add skin topic subscriber. | |
data_lock | |
Lock for skin data structure. | |
skin_data | |
Dictionary containing the raw TaxelArray messages heard by the client, indexed by topic name. | |
skin_subs | |
Dictionary containing the skin subscribers, indexed by topic name. | |
skin_topic_list | |
List of skin topics used by the client. | |
tf_lstnr | |
TF Listener. | |
topic_lock | |
Lock for skin data topics. | |
torso_frame | |
torso_frame Torso frame ID used as the base frame for the associated arm, eg, "/torso_lift_link" | |
trim_threshold | |
Threshold used to control how the data is trimmed - should be set by whatever instatiates a TaxelArrayClient. | |
trimmed_skin_data | |
Dictionary containing the processed TaxelArray messages heard by the client, indexed by topic name. |
Provides an interface to process TaxelArrays published on multiple topics, including trimming the data and transforming the reference frame.
Definition at line 38 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.__init__ | ( | self, | |
skin_topic_list, | |||
torso_frame = "/torso_lift_link" , |
|||
tf_listener = None |
|||
) |
Constructor.
skin_topic_list | List of strings specifying the topics to subscribe to for TaxelArray messages |
torso_frame | String indicating which frame ID is the base frame for the arm |
tf_listener | TF Listener object, if one exists. If this is None, the class will create one. |
Definition at line 43 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.addSkinTopic | ( | self, | |
skin_topic | |||
) |
Add skin topic to internal data structures.
skin_topic | String specifying the topic to be added. |
Definition at line 110 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.addSkinTopicCallback | ( | self, | |
msg | |||
) |
Callback function which sets the topic.
msg | std_msgs/String message. |
Definition at line 94 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.getContactLocationsFromTaxelArray | ( | self, | |
ta_msg | |||
) |
Definition at line 291 of file skin_client.py.
getSkinData accessor function Returns a copy of the skin_data dictionary
Definition at line 277 of file skin_client.py.
Returns a list of taxel locations and list of joint numbers after which the joint torque will have no effect on the contact force, and optionally a time stamp Must be implemented by every robot specific skin client.
Definition at line 301 of file skin_client.py.
getTrimmedSkinData accessor function Returns a copy of the trimmed_skin_data dictionary
Definition at line 283 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.removeSkinTopic | ( | self, | |
skin_topic | |||
) |
Remove skin topic from internal data structures.
skin_topic | String specifying the topic to be removed. |
Definition at line 120 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.removeSkinTopicCallback | ( | self, | |
msg | |||
) |
Callback function to removed skin topic.
msg | StringArray message. |
Definition at line 102 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.setTrimThreshold | ( | self, | |
threshold | |||
) |
Set the trim threshold used by the client.
Should be greater or equal to 0.0.
threshold | Desired threshold. Should be greater than or equal to 0.0. |
Definition at line 89 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.skinCallback | ( | self, | |
msg, | |||
skin_topic | |||
) |
Skin Callback.
Store the message in the data dictionary, indexed by topic. Keeps the raw data in dictionary 'skin_data' and the transformed, trimmed data in 'trimmed_skin_data'
msg | TaxelArray message object |
skin_topic | The topic name triggering the callback. Used to identify what sensor the TaxelArray came from (as there may be multiple publishers running) |
Definition at line 134 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.transformTaxelArray | ( | self, | |
ta_msg, | |||
new_frame | |||
) |
Transform a single taxel array message from one frame to another.
ta_msg | TaxelArray message object to be transformed |
new_frame | The desired frame name |
Definition at line 172 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.trimSkinContacts | ( | self, | |
threshold | |||
) |
Return a trimmed copy of the the skin_data dictionary.
Each TaxelArray within the structure will be trimmed.
threshold | Threshold parameter (float greater than 0.0) |
Definition at line 218 of file skin_client.py.
def hrl_haptic_mpc.skin_client.TaxelArrayClient.trimTaxelArray | ( | self, | |
ta_msg, | |||
threshold | |||
) |
Trim a passed TaxelArray to only incorporate forces of significance.
Returns a trimmed TaxelArray message object with forces of magnitude > threshold. The data is otherwise unchanged.
Definition at line 232 of file skin_client.py.
Add skin topic subscriber.
Remove skin topic subscriber Current topics ROS publisher. Publishes the list of topics on change.
Definition at line 56 of file skin_client.py.
Lock for skin data structure.
Definition at line 44 of file skin_client.py.
Dictionary containing the raw TaxelArray messages heard by the client, indexed by topic name.
Definition at line 49 of file skin_client.py.
Dictionary containing the skin subscribers, indexed by topic name.
Definition at line 48 of file skin_client.py.
List of skin topics used by the client.
Definition at line 53 of file skin_client.py.
TF Listener.
Definition at line 51 of file skin_client.py.
Lock for skin data topics.
Definition at line 45 of file skin_client.py.
torso_frame Torso frame ID used as the base frame for the associated arm, eg, "/torso_lift_link"
Definition at line 46 of file skin_client.py.
Threshold used to control how the data is trimmed - should be set by whatever instatiates a TaxelArrayClient.
Default: 0.0 (ie, trim nothing)
Definition at line 47 of file skin_client.py.
Dictionary containing the processed TaxelArray messages heard by the client, indexed by topic name.
Definition at line 50 of file skin_client.py.