mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
saved work
This commit is contained in:
@@ -39,9 +39,7 @@ class AgilexBase {
|
|||||||
virtual void Connect(std::string dev_name) = 0;
|
virtual void Connect(std::string dev_name) = 0;
|
||||||
|
|
||||||
// cmd thread runs at 50Hz (20ms) by default
|
// cmd thread runs at 50Hz (20ms) by default
|
||||||
void SetCmdThreadPeriodMs(int32_t period_ms) {
|
void SetCmdThreadPeriodMs(int32_t period_ms);
|
||||||
cmd_thread_period_ms_ = period_ms;
|
|
||||||
};
|
|
||||||
|
|
||||||
// timeout: robot stops if user does not call SetMotionCommand() periodically
|
// timeout: robot stops if user does not call SetMotionCommand() periodically
|
||||||
void EnableCmdTimeout(uint32_t timeout_ms = 100);
|
void EnableCmdTimeout(uint32_t timeout_ms = 100);
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ void AgilexBase::Terminate() {
|
|||||||
std::terminate();
|
std::terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AgilexBase::SetCmdThreadPeriodMs(int32_t period_ms) {
|
||||||
|
cmd_thread_period_ms_ = period_ms;
|
||||||
|
};
|
||||||
|
|
||||||
void AgilexBase::EnableCmdTimeout(uint32_t timeout_ms) {
|
void AgilexBase::EnableCmdTimeout(uint32_t timeout_ms) {
|
||||||
enable_timeout_ = true;
|
enable_timeout_ = true;
|
||||||
timeout_ms_ = timeout_ms;
|
timeout_ms_ = timeout_ms;
|
||||||
@@ -153,8 +157,7 @@ void AgilexBase::DisableLightControl() {
|
|||||||
can_->SendFrame(frame);
|
can_->SendFrame(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AgilexBase::SetMotionMode(uint8_t mode)
|
void AgilexBase::SetMotionMode(uint8_t mode) {
|
||||||
{
|
|
||||||
AgxMessage msg;
|
AgxMessage msg;
|
||||||
msg.type = AgxMsgSetMotionMode;
|
msg.type = AgxMsgSetMotionMode;
|
||||||
msg.body.motion_mode_msg.motion_mode = mode;
|
msg.body.motion_mode_msg.motion_mode = mode;
|
||||||
|
|||||||
Reference in New Issue
Block a user