Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
net::mc::tasks::PowerRepeatTask Class Reference

This task is responsible for periodically resending setMotorPower commands to the motors. More...

#include <MissionControlTasks.h>

Inheritance diagram for net::mc::tasks::PowerRepeatTask:
Collaboration diagram for net::mc::tasks::PowerRepeatTask:

Public Member Functions

void setJointPower (robot::types::jointid_t id, double power)
 Set the power to resend to the given joint.
 
void setCmdVel (double steerVel, double xVel)
 Set the drive command to resend.
 
void setTankCmdVel (double steerVel, double xVel)
 Set the tank drive command to resend.
 
void setTurnInPlaceCmdVel (double steerVel)
 Set the turn-in-place drive command to resend.
 
void setCrabCmdVel (double steerVel, double xVel)
 Set the crab drive command to resend.
 
void start () override
 Start the task.
 
void stop () override
 Stop the task and wait for it to finish.
 
- Public Member Functions inherited from util::PeriodicTask< Clock >
 PeriodicTask (const std::chrono::milliseconds &period, const std::function< void()> &f)
 Construct a new periodic task.
 
- Public Member Functions inherited from util::AsyncTask< std::chrono::steady_clock >
 AsyncTask (const std::optional< std::string > &name=std::nullopt)
 Construct a new task.
 
 AsyncTask (const AsyncTask &)=delete
 
AsyncTaskoperator= (const AsyncTask &)=delete
 
bool isRunning ()
 Check if the task is running.
 

Additional Inherited Members

- Protected Member Functions inherited from util::PeriodicTask< Clock >
void task (std::unique_lock< std::mutex > &lock) override
 The long-running task, overridden by client code.
 
void notify () override
 Not for use by client code.
 
- Protected Member Functions inherited from util::AsyncTask< std::chrono::steady_clock >
bool isRunningInternal ()
 Version of AsyncTask::isRunning() that does no synchronization.
 
bool wait_until (std::unique_lock< std::mutex > &lock, const std::chrono::time_point< std::chrono::steady_clock > &tp)
 Wait until the specified time point, or until the task has been stopped.
 
bool wait_for (std::unique_lock< std::mutex > &lock, const std::chrono::duration< Rep, Period > &dur)
 Wait for a given duration, or until the task has been stopped.
 
void wait_until_done (std::unique_lock< std::mutex > &lock)
 Wait until the task has been stopped.
 

Detailed Description

This task is responsible for periodically resending setMotorPower commands to the motors.

This feeds the hardware watchdog and keeps the motors running.

Member Function Documentation

◆ setCmdVel()

void net::mc::tasks::PowerRepeatTask::setCmdVel ( double steerVel,
double xVel )

Set the drive command to resend.

This does not execute the drive command right now.

◆ setCrabCmdVel()

void net::mc::tasks::PowerRepeatTask::setCrabCmdVel ( double steerVel,
double xVel )

Set the crab drive command to resend.

This does not execute the drive command right now.

◆ setJointPower()

void net::mc::tasks::PowerRepeatTask::setJointPower ( robot::types::jointid_t id,
double power )

Set the power to resend to the given joint.

This does not set the motor power right now.

◆ setTankCmdVel()

void net::mc::tasks::PowerRepeatTask::setTankCmdVel ( double steerVel,
double xVel )

Set the tank drive command to resend.

This does not execute the drive command right now.

◆ setTurnInPlaceCmdVel()

void net::mc::tasks::PowerRepeatTask::setTurnInPlaceCmdVel ( double steerVel)

Set the turn-in-place drive command to resend.

This does not execute the drive command right now.

◆ start()

void net::mc::tasks::PowerRepeatTask::start ( )
overridevirtual

Start the task.

If the task is already running, do nothing.

Reimplemented from util::AsyncTask< std::chrono::steady_clock >.

◆ stop()

void net::mc::tasks::PowerRepeatTask::stop ( )
overridevirtual

Stop the task and wait for it to finish.

If the task is not running, do nothing.

Reimplemented from util::AsyncTask< std::chrono::steady_clock >.


The documentation for this class was generated from the following files: