PFlexRobot

Struct PFlexRobot 

Source
pub struct PFlexRobot { /* private fields */ }
Expand description

Containts the TCS client and the rail struct

§Fields

  • tcs_client - A TCSClient instance
  • rail - A Rail instance

Implementations§

Source§

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 robot
  • has_rail - A boolean that indicates whether the robot has a rail
Source

pub const DEFAULT_EE_PITCH: f64 = 90f64

Source

pub const DEFAULT_EE_ROLL: f64 = -180f64

Source

pub fn new(ip: &str, has_rail: bool) -> Self

Creates a new PFlexRobot instance

§Arguments
  • ip - A string slice that holds the IP address of the robot
  • has_rail - A boolean that indicates whether the robot has a rail
§Returns
  • A PFlexRobot instance
Source

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
Source

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
Source

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
Source

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
Source

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
Source

pub fn create_waypoint(&mut self, waypoint: Waypoint) -> Result<(), RobotError>

Source

pub fn create_station(self)

Source

pub fn create_motion_profile(&mut self, profile: MotionProfile)

Source

pub fn get_home(&mut self) -> Result<Vec<String>, RobotError>

Source

pub fn get_location(&mut self) -> Result<Vec<String>, RobotError>

Source

pub fn get_endeffector_position( &mut self, ) -> Result<EndEffectorPosition, RobotError>

Source

pub fn get_system_speed(&mut self) -> i32

Source

pub fn get_all_joints(&mut self) -> Result<Vec<String>, String>

Source

pub fn get_previous_error(&mut self) -> Result<Vec<String>, RobotError>

Source

pub fn get_motion_state(&mut self) -> Result<Vec<String>, RobotError>

Source

pub fn set_system_speed(&mut self, speed: i32)

Source

pub fn set_payload(&mut self, payload: i32) -> Result<(), RobotError>

Source

pub fn set_free_mode(&mut self, free_on: bool) -> Result<(), RobotError>

Source

pub fn set_power(&mut self, power: bool)

Source

pub fn set_mode(&mut self, verbose_tcs: bool) -> Result<(), RobotError>

Source

pub fn move_gripper(&mut self, target_state: f64, motion_profile_id: i32)

Source

pub fn move_rail(&mut self, position: f64) -> Result<(), RobotError>

Source

pub fn move_to_cartesian( &mut self, ee_position: EndEffectorPosition, motion_profile_id: i32, ) -> Result<(), RobotError>

Source

pub fn move_to_waypoint(&mut self, waypoint_id: i32, motion_profile_id: i32)

Source

pub fn move_to_joints( &mut self, joint_config: Vec<&str>, ) -> Result<(), RobotError>

Source

pub fn wait_until_static( &mut self, max_timeout_s: f64, ) -> Result<(), RobotError>

Source

pub fn halt(&mut self) -> Result<(), RobotError>

Source

pub fn disconnect(&mut self)

Cleanly disconnects from the robot

Trait Implementations§

Source§

impl Drop for PFlexRobot

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.