Module for class AbbRcfClient, a client object made for the RCF fab process.
- class rapid_clay_formations_fab.robots.abb_rcf_client.AbbRcfClient(ros_port=9090)[source]¶
Bases:
AbbClient
Robot communication client for RCF.
Subclass of
compas_rrc.AbbClient
with some utility methods added.- Parameters:
ros_port (
int
, optional) – ROS client port for communcation with ABB controller, defaults to 9090.Class attributes
—————-
EXTERNAL_AXES_DUMMY (
compas_rrc.ExternalAxes
) – Dummy object used forcompas_rrc.MoveToRobtarget
andMoveToJoints
objects.
- TIMEOUT_SHORT = 10¶
- TIMEOUT_LONG = 30¶
- EXTERNAL_AXES_DUMMY = ExternalAxes([])¶
- confirm_start()[source]¶
Stop program and prompt user to press play on pendant to resume.
- Return type:
- ping(timeout=None)[source]¶
Ping ABB robot controller.
- Parameters:
timeout – Timeout for reply. Defaults to
10
.- Raises:
compas_rrc.TimeoutError – If no reply is returned before timeout.
- Return type:
- ensure_connection(timeout_ping=None, wait_after_up=2, tries=10)[source]¶
Check connection to ABB controller and restart abb-driver if necessary.
- Parameters:
timeout_ping – Timeout for ping response.
wait_after_up – Time to wait to ping after abb-driver container started.
tries – How many times to ping before raising error.
- Raises:
compas_rrc.TimeoutException – If no reply is returned to second ping before timeout.
- class rapid_clay_formations_fab.robots.abb_rcf_client.AbbRcfFabricationClient(rob_conf, pick_station, ros_port=9090)[source]¶
Bases:
AbbRcfClient
Robot communication client for RCF fabrication process.
Subclass of
AbbRcfClient
with fabrication specific methods.- Parameters:
ros (
compas_fab.backends.ros.RosClient
) – ROS client for communcation with ABB controller.rob_conf (
confuse.AttrDict
) – Configuration namespace created from configuration file and command line arguments.pick_station (
rapid_clay_formations_fab.fab_data.PickStation
) – Pick station for fabrication elements.
- ensure_connection(timeout_ping=None, wait_after_up=None, tries=10)[source]¶
Check connection to ABB controller and restart abb-driver if necessary.
- Parameters:
tries (
int
, optional) – Connection tries, defaults to 3.- Raises:
TimeoutError – If no reply is returned before timeout.
- Return type:
- pick_element()[source]¶
Send movement and IO instructions to pick up fabrication element.
- Return type:
- place_element(element)[source]¶
Send movement and IO instructions to place a fabrication element.
Uses fab_conf set up with command line arguments and configuration file.
- Parameters:
element (
rapid_clay_formations_fab.fab_data.PlaceElement
) – Element to place.- Returns:
compas_rrc.FutureResult
– Object which blocks while waiting for feedback from robot. Calling result on this object will return the time the procedure took.- Return type:
FutureResult
- execute_trajectory(trajectory, speed, zone, blocking=False, stop_at_last=False, motion_type='J')[source]¶
Execute a
JointTrajectory
.- Parameters:
trajectory – Trajectory defined by frames or configurations.
speed (
float
) – Speed in mm/s.zone (
dict
) – Zone defined either in millimeters or usingcompas_rrc.ZoneData
names.blocking (
bool
, optional) – If execution should be blocked while waiting for the robot to reach last trajectory point. Defaults toFalse
stop_at_last (
bool
, optional) – If last trajectory point should be sent as a non fly-by point, i.e. should the last trajectory points zone be set to compas_rrc.Zone.FINE.
- Return type:
FutureResult