AbbClient
-
class
compas_rrc.
AbbClient
(ros, namespace='/rob1')[source] Bases:
object
Client used to communicate with ABB robots via ROS.
This client handles all communication over ROS topics, and implements blocking behaviors as an application-level construct.
Examples
Connection example to a single robot:
# Create Ros Client ros = rrc.RosClient() ros.run() # Create ABB Client abb = rrc.AbbClient(ros, '/rob1') print('Connected.') # Close client ros.close() ros.terminate()
Advance connection example to multiple robots:
# Create Ros Client ros = rrc.RosClient() ros.run() # Create ABB Clients abb_rob1 = rrc.AbbClient(ros, '/rob1') abb_rob2 = rrc.AbbClient(ros, '/rob2') # Clients are connected print('Connected.') # Print Text abb_rob1.send(rrc.PrintText('Hello Robot 1')) abb_rob2.send(rrc.PrintText('Hello Robot 2')) # Close client ros.close() ros.terminate()
Methods
__init__
(ros[, namespace])Initialize a new robot client instance.
Ensure protocol version on the server matches the protocol version on the client.
feedback_callback
(message)Internal method.
send
(instruction)Sends an instruction to the robot without waiting.
send_and_subscribe
(instruction, callback)Send instruction and activate a service on the robot to stream feedback at a regular inverval.
send_and_wait
(instruction[, timeout])Send instruction and wait for feedback.
Check if the protocol version on the server matches the protocol version on the client.