mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
demo: renamed demo folder to sample, updated readme
This commit is contained in:
@@ -116,7 +116,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
|
||||
# Build demo
|
||||
if(BUILD_WITHOUT_ROS)
|
||||
add_subdirectory(demo)
|
||||
add_subdirectory(sample)
|
||||
endif()
|
||||
|
||||
# Build tests
|
||||
|
||||
11
README.md
11
README.md
@@ -120,14 +120,21 @@ The log file can be replayed using the following command
|
||||
$ canplayer -I <candump-log-file-name>.log
|
||||
```
|
||||
|
||||
## Demo Code
|
||||
## Sample Code
|
||||
|
||||
You can find demo code for each robot in "demo" folder. For example, run the demo for Scout robot
|
||||
You can find sample code for each robot in "sample" folder. For example, you can run the demo for Scout robot
|
||||
|
||||
```
|
||||
$ ./bin/demo_scout_robot can0
|
||||
```
|
||||
|
||||
**Important note:**
|
||||
|
||||
* **The demo program may command the robot to move!** Please make sure you have the remote controller with you and the
|
||||
robot is in a safe place to move around. You can also modify the demo code to disable the motion commands.
|
||||
* If the robot is not moving as expected, please first check if the remote controller is in manual mode and if the
|
||||
E-Stop buttons are released.
|
||||
|
||||
## Reference
|
||||
|
||||
* [CAN command reference in Linux](https://notes.rdu.im/system/linux/canbus/)
|
||||
|
||||
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
|
||||
while (true) {
|
||||
// motion control
|
||||
std::cout << "Motor: 1.0, 0" << std::endl;
|
||||
tracer->SetMotionCommand(0.0, 0.0);
|
||||
tracer->SetMotionCommand(1.0, 0.0);
|
||||
|
||||
// get robot state
|
||||
auto state = tracer->GetRobotState();
|
||||
Reference in New Issue
Block a user