# SDK for AgileX Scout Mobile Base
Copyright (c) 2019 [WestonRobot](https://www.westonrobot.com/)
## Introduction
This software packages provides a C++ interface to communicate with the Scout mobile base, for sending commands to the robot and acquiring the latest robot state. The SDK works on both x86 and ARM platforms.
Generally, you only need to instantiate an object of "class ScoutBase", then use the object to programmatically control the robot. Internally, class ScoutBase manages two background threads, one to process CAN/UART messages of the robot state and accordingly update state variables in the ScoutState data structure, and the other to maintain a 50Hz loop and send the latest command to the robot base. User can iteratively perform tasks in the main thread and check the robot state or set control commands.
Refer to "src/apps/scout_demo" for an example.
## Package Structure
* apps: demo to illustrate how to use the SDK, scout_monitor is a TUI application to monitor states of Scout
* comm/async_io: manages raw data communication with robot
* comm/scout_protocol: encoding and decoding of Scout UART/CAN protocols
* scout_base: interface to send command to robot and receive robot state
* third_party
- asio: asynchronous IO management (serial and CAN)
- googletest: for unit tests only (not required otherwise)
## Setup CAN-To-USB adapter
The instructions work for stm32f0-based adapter with [candleLight](https://github.com/HubertD/candleLight_fw) firmware on a host computer running Linux. (Refer to limitations listed at the bottom for more details.)
1. Enable gs_usb kernel module
```
$ sudo modprobe gs_usb
```
2. Bringup can device
```
$ sudo ip link set can0 up type can bitrate 500000
```
3. If no error occured during the previous steps, you should be able to see the can device now by using command
```
$ ifconfig -a
```
4. Install and use can-utils to test the hardware
```
$ sudo apt install can-utils
```
5. Testing command
```
# receiving data from can0
$ candump can0
# send data to can0
$ cansend can0 001#1122334455667788
```
Two scripts inside the "./scripts" folder are provided for easy setup. You can run "./setup_can2usb.bash" for the first-time setup and run "./bringup_can2usb.bash" to bring up the device each time you unplug and re-plug the adapter.
## Build SDK
Install compile tools
```
$ sudo apt install build-essential cmake
```
If you want to build the TUI monitor tool, install libncurses
```
$ sudo apt install libncurses5-dev
```
Configure and build
```
$ cd scout_sdk
$ mkdir build
$ cd build
$ cmake ..
$ make
```
## Known Limitations
1. The CAN interface requires the hardware to appear as a CAN device in the system. You can use the command "ifconfig" to check the interface status. For example, you may see something like
```
can1: flags=193<UP,RUNNING,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 4751634 bytes 38013072 (36.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 126269 bytes 1010152 (986.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 43
```
If you use your own CAN-to-USB adapter, make sure it supports slcan or can be brought up as a native CAN device (for example, CANable https://www.canable.io/). Some adapters may use a custom-defined protocol and appear as a serial device in Linux. In such a case, you will have to translate the byte stream between CAN and UART by yourself. It would be difficult for us to provide support for them since not all manufacturers define this protocol in the same way.
<!--
2. Release v0.1 of this SDK provided a serial interface to talk with the robot. Front/rear light on the robot cannot be controlled and only a small subset of all robot states can be acquired through that interface. Full support of the serial interface is still under development and requires additional work on both the SDK and firmware sides.
-->
## Reference
* [CAN command reference in Linux](https://wiki.rdu.im/_pages/Notes/Embedded-System/Linux/can-bus-in-linux.html)
没有合适的资源?快使用搜索试试~ 我知道了~
松灵差速小车ROS仿真模型
共813个文件
hpp:427个
ipp:64个
launch:48个
5星 · 超过95%的资源 需积分: 5 12 下载量 117 浏览量
2023-04-19
22:55:56
上传
评论 1
收藏 64.71MB ZIP 举报
温馨提示
松灵差速小车仿真模型,用作gazebo仿真。
资源推荐
资源详情
资源评论
收起资源包目录
松灵差速小车ROS仿真模型 (813个子文件)
mini.xacro.backup 4KB
setup_can2usb.bash 192B
setup_can2usb.bash 190B
setup_can2usb.bash 190B
setup_can2usb.bash 190B
bringup_can2usb.bash 86B
bringup_can2usb.bash 86B
bringup_can2usb.bash 86B
bringup_can2usb.bash 86B
scout_uart_parser.c 22KB
scout_can_parser.c 7KB
FindLCM.cmake 1KB
model.config 300B
model.config 294B
model.config 253B
model.config 243B
model.config 240B
model.config 239B
model.config 235B
scout_base.cpp 15KB
async_serial.cpp 10KB
scout_messenger.cpp 8KB
async_can.cpp 5KB
tracer_skid_steer.cpp 2KB
scout_skid_steer.cpp 2KB
scout_skid_steer.cpp 2KB
asyncio_utils.cpp 2KB
scout_base_node.cpp 2KB
scout_base_sim_node.cpp 1KB
tracer_skid_steer_controller.cpp 748B
scout_skid_steer_controller.cpp 742B
scout_skid_steer_controller.cpp 742B
src.cpp 694B
tracer_base_link.dae 20.92MB
scout_mini_base_link.dae 13.99MB
scout_mini_base_link2.dae 13.99MB
base_link.dae 13.42MB
base_link.dae 13.42MB
tracer_base_link_no_wheel.dae 13.13MB
base_link.dae 3.61MB
wheel_type1.dae 2.76MB
wheel_type1.dae 2.76MB
wheel_type2.dae 2.76MB
wheel_type2.dae 2.76MB
wheel.dae 2.65MB
sai_di3.dae 1.82MB
sai_di2.dae 1.73MB
realsense.dae 1.55MB
sai_di1.dae 1.36MB
sai_di4.dae 1.29MB
tracer_wheel.dae 915KB
wheel.dae 681KB
xtion_pro_camera.dae 593KB
castor_joint.dae 531KB
rplidar.dae 443KB
castor.dae 316KB
yaw_platform.dae 65KB
pitch_platform.dae 34KB
post.dae 15KB
base_link_full.dae 452B
base_link_full.dae 452B
scout_mini.gazebo 4KB
tracer.gazebo 3KB
scout_v2.gazebo 3KB
tracer_wheel.gazebo 2KB
scout_wheel.gazebo 2KB
scout_wheel.gazebo 2KB
scout_mini_wheel.gazebo 2KB
scout_monitor_tool.gif 539KB
.gitignore 644B
scout_protocol.h 8KB
scout_can_parser.h 1KB
scout_uart_parser.h 988B
read_until.hpp 72KB
basic_socket_acceptor.hpp 66KB
buffer.hpp 66KB
basic_socket.hpp 57KB
config.hpp 54KB
read_until.hpp 48KB
basic_resolver.hpp 43KB
basic_datagram_socket.hpp 40KB
connect.hpp 40KB
basic_raw_socket.hpp 39KB
read.hpp 37KB
write.hpp 37KB
basic_stream_socket.hpp 35KB
io_context.hpp 32KB
connect.hpp 28KB
write_at.hpp 27KB
serial_port.hpp 26KB
stream.hpp 25KB
read_at.hpp 25KB
context.hpp 25KB
read.hpp 25KB
basic_waitable_timer.hpp 24KB
basic_serial_port.hpp 24KB
use_future.hpp 24KB
basic_seq_packet_socket.hpp 23KB
write.hpp 23KB
read_at.hpp 23KB
共 813 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
- 小明斗2023-07-29这个文件详尽地介绍了松灵差速小车的ROS仿真模型,让人对这个小车有了更深入的了解。
- 我要WhatYouNeed2023-07-29这个文件提供的仿真模型让我能够在实验室内进行多种场景的测试,非常方便。
- 萌新小白爱学习2023-07-29这个文件的写作风格很朴实,读起来很舒服,没有过多的废话,很好理解。
- 曹多鱼2023-07-29通过这个文件,我学到了很多关于ROS仿真模型的知识,对我的研究工作有很大帮助。
- 白绍伟2023-07-29文中的示例代码和实验结果都很实用,对我自己的项目启发很大。
Travis.X
- 粉丝: 1422
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- sony 索尼IMX334摄像头模组电路板AD版硬件PCB图(6层板).zip
- 基于flask和echarts融合交易策略的bitfinex可视化微服务.zip
- 包含了wvp-assist.tar wvp-talk.tar zlmediakit.tar .
- 3r4efgh53wgrf43tw
- 2024新版Java基础从入门到精通全套视频+资料下载
- Spring AI大模型视频教程+ChatGPT视频教程+OpenAI大模型视频教程(资料+视频教程)
- ABB工业机器人教程PDF版本
- 123321123323211
- yolov8实战第八天-pyqt5-yolov8实现车牌识别系统(论文(8700+字+数据集+完整部署代码+代码使用说明)
- 三相桥式全桥整流电路MATALB Simulink仿真文件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功