mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
change set motion command function
This commit is contained in:
@@ -66,7 +66,8 @@ class RangerBase : public AgilexBase {
|
|||||||
void Connect(std::string dev_name) override;
|
void Connect(std::string dev_name) override;
|
||||||
|
|
||||||
// robot control
|
// robot control
|
||||||
void SetMotionCommand(double linear_vel, double angular_vel);
|
void SetMotionCommand(double linear_vel, double steer_angle,
|
||||||
|
double lateral_vel = 0.0, double angular_vel = 0.0);
|
||||||
void SetLightCommand(const RangerLightCmd &cmd);
|
void SetLightCommand(const RangerLightCmd &cmd);
|
||||||
void SetMotionMode(uint8_t mode);
|
void SetMotionMode(uint8_t mode);
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,10 @@ void RangerBase::Connect(std::string dev_name) {
|
|||||||
std::placeholders::_1));
|
std::placeholders::_1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RangerBase::SetMotionCommand(double linear_vel, double angular_vel) {
|
void RangerBase::SetMotionCommand(double linear_vel, double steer_angle,
|
||||||
AgilexBase::SetMotionCommand(linear_vel, 0.0, 0.0, angular_vel/10.0);
|
double lateral_vel, double angular_vel) {
|
||||||
|
AgilexBase::SetMotionCommand(linear_vel, angular_vel, lateral_vel,
|
||||||
|
steer_angle / 10.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RangerBase::SetLightCommand(const RangerLightCmd &cmd) {
|
void RangerBase::SetLightCommand(const RangerLightCmd &cmd) {
|
||||||
@@ -40,8 +42,7 @@ void RangerBase::SetLightCommand(const RangerLightCmd &cmd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RangerBase::SetMotionMode(uint8_t mode)
|
void RangerBase::SetMotionMode(uint8_t mode) {
|
||||||
{
|
|
||||||
AgilexBase::SetMotionMode(mode);
|
AgilexBase::SetMotionMode(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user