Trait arci::JointTrajectoryClient
source · pub trait JointTrajectoryClient: Send + Sync {
// Required methods
fn joint_names(&self) -> Vec<String>;
fn current_joint_positions(&self) -> Result<Vec<f64>, Error>;
fn send_joint_positions(
&self,
positions: Vec<f64>,
duration: Duration,
) -> Result<WaitFuture, Error>;
fn send_joint_trajectory(
&self,
trajectory: Vec<TrajectoryPoint>,
) -> Result<WaitFuture, Error>;
}
Required Methods§
sourcefn joint_names(&self) -> Vec<String>
fn joint_names(&self) -> Vec<String>
Returns names of joints that this client handles.
sourcefn current_joint_positions(&self) -> Result<Vec<f64>, Error>
fn current_joint_positions(&self) -> Result<Vec<f64>, Error>
Returns the current joint positions.
sourcefn send_joint_positions(
&self,
positions: Vec<f64>,
duration: Duration,
) -> Result<WaitFuture, Error>
fn send_joint_positions( &self, positions: Vec<f64>, duration: Duration, ) -> Result<WaitFuture, Error>
Send the specified joint positions and returns a future that waits until complete the move joints.
§Implementation
The returned future is expected to behave similarly to
std::thread::JoinHandle
and tokio::task::JoinHandle
:
- Can wait for the operation to complete by
.await
. - The operation does not end even if it is dropped.
If the operation may block the current thread for an extended period of time, consider spawning a thread to running blocking operations.
sourcefn send_joint_trajectory(
&self,
trajectory: Vec<TrajectoryPoint>,
) -> Result<WaitFuture, Error>
fn send_joint_trajectory( &self, trajectory: Vec<TrajectoryPoint>, ) -> Result<WaitFuture, Error>
Send the specified joint trajectory and returns a future that waits until complete the move joints.
§Implementation
See the “Implementation” section of the
send_joint_positions
method.