pub struct PyPoulpeRemoteClient { /* private fields */ }
Implementations§
Source§impl PyPoulpeRemoteClient
impl PyPoulpeRemoteClient
pub fn new(addr: &str, ids: Vec<u16>, update_period: f32) -> Self
Sourcepub fn get_mode_of_operation(&mut self, slave_id: u16) -> u32
pub fn get_mode_of_operation(&mut self, slave_id: u16) -> u32
Sourcepub fn set_mode_of_operation(&mut self, slave_id: u16, mode: u32)
pub fn set_mode_of_operation(&mut self, slave_id: u16, mode: u32)
Set the mode of operation
§Args:
- slave_id (int): The slave id
- mode (int): The mode of operation - 1: Profile Position Mode, 3: Profile Velocity Mode, 4: Profile Torque Mode
Sourcepub fn print_mode_of_operation(&mut self, slave_id: u16)
pub fn print_mode_of_operation(&mut self, slave_id: u16)
Sourcepub fn set_target_position(&mut self, slave_id: u16, position: Vec<f32>)
pub fn set_target_position(&mut self, slave_id: u16, position: Vec<f32>)
Sourcepub fn set_velocity_limit(&mut self, slave_id: u16, velocity: Vec<f32>)
pub fn set_velocity_limit(&mut self, slave_id: u16, velocity: Vec<f32>)
Set the velocity limit
§Args:
- slave_id (int): The slave id
- velocity_limit (list): Relative velocity limit from 0 to 1
Sourcepub fn set_torque_limit(&mut self, slave_id: u16, torque: Vec<f32>)
pub fn set_torque_limit(&mut self, slave_id: u16, torque: Vec<f32>)
Set the torque limit
§Args:
- slave_id (int): The slave id
- torque_limit (list): Relative torque limit from 0 to 1
Sourcepub fn get_position_actual_value(&mut self, slave_id: u16) -> Vec<f32>
pub fn get_position_actual_value(&mut self, slave_id: u16) -> Vec<f32>
Sourcepub fn get_target_position(&mut self, slave_id: u16) -> Vec<f32>
pub fn get_target_position(&mut self, slave_id: u16) -> Vec<f32>
Sourcepub fn set_target_velocity(&mut self, slave_id: u16, velocity: Vec<f32>)
pub fn set_target_velocity(&mut self, slave_id: u16, velocity: Vec<f32>)
Sourcepub fn set_target_torque(&mut self, slave_id: u16, torque: Vec<f32>)
pub fn set_target_torque(&mut self, slave_id: u16, torque: Vec<f32>)
Sourcepub fn get_velocity_actual_value(&mut self, slave_id: u16) -> Vec<f32>
pub fn get_velocity_actual_value(&mut self, slave_id: u16) -> Vec<f32>
Sourcepub fn get_torque_actual_value(&mut self, slave_id: u16) -> Vec<f32>
pub fn get_torque_actual_value(&mut self, slave_id: u16) -> Vec<f32>
Sourcepub fn get_axis_sensors(&mut self, slave_id: u16) -> Vec<f32>
pub fn get_axis_sensors(&mut self, slave_id: u16) -> Vec<f32>
Sourcepub fn get_axis_sensor_zeros(&mut self, slave_id: u16) -> Vec<f32>
pub fn get_axis_sensor_zeros(&mut self, slave_id: u16) -> Vec<f32>
Sourcepub fn get_torque_state(&mut self, slave_id: u16) -> bool
pub fn get_torque_state(&mut self, slave_id: u16) -> bool
Sourcepub fn print_state(&mut self, slave_id: u16)
pub fn print_state(&mut self, slave_id: u16)
Sourcepub fn get_error_codes(&mut self, slave_id: u16) -> Vec<i32>
pub fn get_error_codes(&mut self, slave_id: u16) -> Vec<i32>
Sourcepub fn print_error_codes(&mut self, slave_id: u16)
pub fn print_error_codes(&mut self, slave_id: u16)
pub fn get_all_slaves_in_network(&mut self) -> (Vec<u16>, Vec<String>)
Sourcepub fn get_motor_temperatures(&mut self, slave_id: u16) -> Vec<f32>
pub fn get_motor_temperatures(&mut self, slave_id: u16) -> Vec<f32>
Sourcepub fn get_board_temperatures(&mut self, slave_id: u16) -> Vec<f32>
pub fn get_board_temperatures(&mut self, slave_id: u16) -> Vec<f32>
Sourcepub fn emergency_stop(&mut self, slave_id: u16)
pub fn emergency_stop(&mut self, slave_id: u16)
Trait Implementations§
Source§impl IntoPy<Py<PyAny>> for PyPoulpeRemoteClient
impl IntoPy<Py<PyAny>> for PyPoulpeRemoteClient
Source§impl<'py> IntoPyObject<'py> for PyPoulpeRemoteClient
impl<'py> IntoPyObject<'py> for PyPoulpeRemoteClient
Source§type Target = PyPoulpeRemoteClient
type Target = PyPoulpeRemoteClient
The Python output type
Source§type Output = Bound<'py, <PyPoulpeRemoteClient as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <PyPoulpeRemoteClient as IntoPyObject<'py>>::Target>
The smart pointer type to use. Read more
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Performs the conversion.
Source§impl PyClass for PyPoulpeRemoteClient
impl PyClass for PyPoulpeRemoteClient
Source§impl PyClassImpl for PyPoulpeRemoteClient
impl PyClassImpl for PyPoulpeRemoteClient
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
Source§type ThreadChecker = SendablePyClass<PyPoulpeRemoteClient>
type ThreadChecker = SendablePyClass<PyPoulpeRemoteClient>
This handles following two situations: Read more
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature<PyPoulpeRemoteClient> for PyClassImplCollector<PyPoulpeRemoteClient>
impl PyClassNewTextSignature<PyPoulpeRemoteClient> for PyClassImplCollector<PyPoulpeRemoteClient>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyPoulpeRemoteClient
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyPoulpeRemoteClient
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyPoulpeRemoteClient
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyPoulpeRemoteClient
Source§impl PyMethods<PyPoulpeRemoteClient> for PyClassImplCollector<PyPoulpeRemoteClient>
impl PyMethods<PyPoulpeRemoteClient> for PyClassImplCollector<PyPoulpeRemoteClient>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for PyPoulpeRemoteClient
impl PyTypeInfo for PyPoulpeRemoteClient
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
👎Deprecated since 0.23.0: renamed to
PyTypeInfo::type_object
Deprecated name for [
PyTypeInfo::type_object
].§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
Checks if
object
is an instance of this type or a subclass of this type.§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
👎Deprecated since 0.23.0: renamed to
PyTypeInfo::is_type_of
Deprecated name for [
PyTypeInfo::is_type_of
].§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
Checks if
object
is an instance of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
👎Deprecated since 0.23.0: renamed to
PyTypeInfo::is_exact_type_of
Deprecated name for [
PyTypeInfo::is_exact_type_of
].impl DerefToPyAny for PyPoulpeRemoteClient
Auto Trait Implementations§
impl !Freeze for PyPoulpeRemoteClient
impl !RefUnwindSafe for PyPoulpeRemoteClient
impl Send for PyPoulpeRemoteClient
impl Sync for PyPoulpeRemoteClient
impl Unpin for PyPoulpeRemoteClient
impl !UnwindSafe for PyPoulpeRemoteClient
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
Converts
self
into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
Converts
self
into an owned Python object, dropping type information and unbinding it
from the 'py
lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
Converts
self
into a Python object. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.