mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
updated some path for app and demo for scout and tracer
This commit is contained in:
@@ -7,13 +7,12 @@
|
||||
* Copyright (c) 2019 Ruixiang Du (rdu)
|
||||
*/
|
||||
|
||||
#include "ugv_sdk/tracer/tracer_base.hpp"
|
||||
#include "ugv_sdk/tracer_base.hpp"
|
||||
|
||||
using namespace westonrobot;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
std::string device_name;
|
||||
int32_t baud_rate = 0;
|
||||
|
||||
if (argc == 2) {
|
||||
device_name = {argv[1]};
|
||||
@@ -32,19 +31,19 @@ int main(int argc, char **argv) {
|
||||
|
||||
// light control
|
||||
std::cout << "Light: const off" << std::endl;
|
||||
tracer.SetLightCommand({TracerLightCmd::LightMode::CONST_OFF, 0});
|
||||
tracer.SetLightCommand({CONST_OFF, 0});
|
||||
// usleep(50000);
|
||||
sleep(3);
|
||||
std::cout << "Light: const on" << std::endl;
|
||||
tracer.SetLightCommand({TracerLightCmd::LightMode::CONST_ON, 0});
|
||||
tracer.SetLightCommand({CONST_ON, 0});
|
||||
// usleep(50000);
|
||||
sleep(3);
|
||||
std::cout << "Light: breath" << std::endl;
|
||||
tracer.SetLightCommand({TracerLightCmd::LightMode::BREATH, 0});
|
||||
tracer.SetLightCommand({BREATH, 0});
|
||||
// usleep(50000);
|
||||
sleep(8);
|
||||
std::cout << "Light: custom 90-80" << std::endl;
|
||||
tracer.SetLightCommand({TracerLightCmd::LightMode::CUSTOM, 90});
|
||||
tracer.SetLightCommand({CUSTOM, 90});
|
||||
// usleep(50000);
|
||||
sleep(3);
|
||||
std::cout << "Light: diabled cmd control" << std::endl;
|
||||
@@ -83,12 +82,12 @@ int main(int argc, char **argv) {
|
||||
auto state = tracer.GetTracerState();
|
||||
std::cout << "-------------------------------" << std::endl;
|
||||
std::cout << "count: " << count << std::endl;
|
||||
std::cout << "control mode: " << static_cast<int>(state.control_mode)
|
||||
<< " , base state: " << static_cast<int>(state.base_state)
|
||||
std::cout << "control mode: " << static_cast<int>(state.system_state.control_mode)
|
||||
<< " , vehicle state: " << static_cast<int>(state.system_state.vehicle_state)
|
||||
<< std::endl;
|
||||
std::cout << "battery voltage: " << state.battery_voltage << std::endl;
|
||||
std::cout << "velocity (linear, angular): " << state.linear_velocity << ", "
|
||||
<< state.angular_velocity << std::endl;
|
||||
std::cout << "battery voltage: " << state.system_state.battery_voltage << std::endl;
|
||||
std::cout << "velocity (linear, angular): " << state.motion_state.linear_velocity << ", "
|
||||
<< state.motion_state.angular_velocity << std::endl;
|
||||
std::cout << "-------------------------------" << std::endl;
|
||||
|
||||
// usleep(20000);
|
||||
|
||||
Reference in New Issue
Block a user