Skip to main content

WrenchClient

Inherits from: ZenohClient A Zenoh client for publishing and receiving wrench messages over Zenoh topics. Wrenches are commonly received from contact sensors, and published to end effectors that need to apply a force or torque. Attributes: force (numpy.ndarray): Current force as [x, y, z] torque (numpy.ndarray): Current torque as [x, y, z] relative (bool): Whether wrenches are relative to current position blocking (bool): Whether wrench commands block until complete

Inherited methods

  • From ZenohClient: getLatestMessage, msg_cb, run, publish, stop

init

WrenchClient.__init__(client_dict, agent_dict = None, shared_session = None)
Initialize the wrench client.
Arguments
client_dict (dict)
dict
required
Configuration dictionary for the client
agent_dict (dict, optional)
dict, optional
Dictionary of agent parameters. Defaults to None.
shared_session
Optional shared Zenoh session. Defaults to None.

publish_wrench

WrenchClient.publish_wrench(force, torque)
Publish a wrench message.
Arguments
force (array-like)
array-like
required
Force as [x, y, z]
torque (array-like)
array-like
required
Torque as [x, y, z]

get_wrench

WrenchClient.get_wrench() -> Optional[tuple]
Get the latest wrench message.
Returns
tuple
Optional[tuple]
(force, torque) as numpy arrays or None

process_latest_msg

WrenchClient.process_latest_msg()
Process the latest received wrench message.

get_force

WrenchClient.get_force()
Get the current force.
Returns
numpy.ndarray
Current force as [x, y, z]

get_torque

WrenchClient.get_torque()
Get the current torque.
Returns
numpy.ndarray
Current torque as [x, y, z]