pub struct PFlexRobot { /* private fields */ }Expand description
Containts the TCS client and the rail struct
§Fields
tcs_client- A TCSClient instancerail- A Rail instance
Implementations§
Source§impl PFlexRobot
Creates a new PFlexRobot instance and panics if it cannot connect to the robot
impl PFlexRobot
Creates a new PFlexRobot instance and panics if it cannot connect to the robot
§Arguments
ip- A string slice that holds the IP address of the robothas_rail- A boolean that indicates whether the robot has a rail
pub const DEFAULT_EE_PITCH: f64 = 90f64
pub const DEFAULT_EE_ROLL: f64 = -180f64
Sourcepub fn is_connection_alive(&mut self) -> bool
pub fn is_connection_alive(&mut self) -> bool
Polls the robot with a NoOp call to check the connection status
§Returns
- A boolean that indicates whether the connection is alive
Sourcepub fn is_robot_attached(&mut self) -> Result<bool, RobotError>
pub fn is_robot_attached(&mut self) -> Result<bool, RobotError>
Checks if the robot is attached
§Returns
- A boolean that indicates whether the robot is attached
- A RobotError if the robot is not attached
Sourcepub fn is_robot_home(&mut self) -> Result<bool, RobotError>
pub fn is_robot_home(&mut self) -> Result<bool, RobotError>
Checks if the robot is homed
§Returns
- A boolean that indicates whether the robot is homed
- A RobotError if the robot is not homed
Sourcepub fn attach_robot(&mut self) -> Result<(), RobotError>
pub fn attach_robot(&mut self) -> Result<(), RobotError>
Attaches to the default robot
§Returns
- A RobotError if the robot cannot be attached
- Ok if the robot is attached
Sourcepub fn select_robot(&mut self) -> Result<(), RobotError>
pub fn select_robot(&mut self) -> Result<(), RobotError>
Selects the default robot
- A RobotError if the robot cannot be selected
- Ok if the robot is selected
pub fn create_waypoint(&mut self, waypoint: Waypoint) -> Result<(), RobotError>
pub fn create_station(self)
pub fn create_motion_profile(&mut self, profile: MotionProfile)
pub fn get_home(&mut self) -> Result<Vec<String>, RobotError>
pub fn get_location(&mut self) -> Result<Vec<String>, RobotError>
pub fn get_endeffector_position( &mut self, ) -> Result<EndEffectorPosition, RobotError>
pub fn get_system_speed(&mut self) -> i32
pub fn get_all_joints(&mut self) -> Result<Vec<String>, String>
pub fn get_previous_error(&mut self) -> Result<Vec<String>, RobotError>
pub fn get_motion_state(&mut self) -> Result<Vec<String>, RobotError>
pub fn set_system_speed(&mut self, speed: i32)
pub fn set_payload(&mut self, payload: i32) -> Result<(), RobotError>
pub fn set_free_mode(&mut self, free_on: bool) -> Result<(), RobotError>
pub fn set_power(&mut self, power: bool)
pub fn set_mode(&mut self, verbose_tcs: bool) -> Result<(), RobotError>
pub fn move_gripper(&mut self, target_state: f64, motion_profile_id: i32)
pub fn move_rail(&mut self, position: f64) -> Result<(), RobotError>
pub fn move_to_cartesian( &mut self, ee_position: EndEffectorPosition, motion_profile_id: i32, ) -> Result<(), RobotError>
pub fn move_to_waypoint(&mut self, waypoint_id: i32, motion_profile_id: i32)
pub fn move_to_joints( &mut self, joint_config: Vec<&str>, ) -> Result<(), RobotError>
pub fn wait_until_static( &mut self, max_timeout_s: f64, ) -> Result<(), RobotError>
pub fn halt(&mut self) -> Result<(), RobotError>
Sourcepub fn disconnect(&mut self)
pub fn disconnect(&mut self)
Cleanly disconnects from the robot
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PFlexRobot
impl RefUnwindSafe for PFlexRobot
impl Send for PFlexRobot
impl Sync for PFlexRobot
impl Unpin for PFlexRobot
impl UnwindSafe for PFlexRobot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more