# SDK
The SDK provide a simple C++ class interface to send command to the masterboard via Ethernet or Wifi.
## Prepare you interface
You first need to identify you interface name. To get a list of the interface on your computer, run ```ifconfig```
#### Ethernet
A direct connection should me made between the master board and you computer. It is not possible to use the same interface for local network and master board connection.
###### Optional configuration:
Some packet will be sent by the OS to the master board. Their are not usefull since the master board only use raw MAC frame.
To disable ARP packet run:
```
sudo ifconfig MY_INTERFACE -arp
```
where MY_INTERFACE is your lan interface name.
To disable IPV6 trafic, add this line into ``` /etc/sysctl.conf```
```
net.ipv6.conf.MY_INTERFACE.disable_ipv6 = 1
```
where MY_INTERFACE is your lan interface name.
#### Wifi
Your interface should support monitor mode and injection since the procol used by the master board is not a standard wifi.
You need to configure your interface. A script is available in the sdk folder. to use it run
```
sudo ./setup_wifi.sh MY_INTERFACE
```
where MY_INTERFACE your wlan interface name.
How to run the C++ example
--------
main.cpp is a simple example to test the SDK, tested on ubuntu.
It will execute a sinusoid trajectory on the first N_CONTROLLED_SLAVE
to compile it go into the sdk folder and run:
```
make
```
a bin folder is created.
to run the example run:
```
sudo ./bin/exec MY_INTERFACE
```
where MY_INTERFACE is the name of the network interface used to connect to the master board.
How to run the Python examples
--------
* Clone the repository: `git clone --recursive https://github.com/open-dynamic-robot-initiative/master-board.git`
* Get into the repository: `cd master-board`
* Set the number of controlled drivers by opening `sdk/master_board_sdk/example/example.py` and tuning the `N_SLAVES_CONTROLED` constant: `N_SLAVES_CONTROLED 4` if you are using 4 driver boards (1 per leg)
* Get in `sdk/master_board_sdk/`: `cd sdk/master_board_sdk/`
* Create a build folder: `mkdir build`
* Get into the folder: `cd build`
* Two possibilities:
* Using `ccmake ..` turn on Python bindings by setting `BUILD_PYTHON_INTERFACE` to `ON` and `CMAKE_BUILD_TYPE` to `RELEASE`. Then compile and create the bindings: `cmake ..` then `make`
* Directly use `cmake -DBUILD_PYTHON_INTERFACE=ON -DCMAKE_BUILD_TYPE=RELEASE ..` then `make`. If you want to run the scripts with Python 3 then use `cmake -DBUILD_PYTHON_INTERFACE=ON -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3) ..` instead.
* Run the control script with the name of your Ethernet interface instead of `name_interface` (for instance `enp1s0`):
`sudo PYTHONPATH=. python example/example.pyc -i name_interface`
* Run the listener script with the name of your Ethernet interface instead of `name_interface` (for instance `enp1s0`):
`sudo PYTHONPATH=. python example/listener.pyc -i name_interface`
* Run the communication analyser script with the name of your Ethernet interface instead of `name_interface` (for instance `enp1s0`):
`sudo PYTHONPATH=. python example/com_analyser.pyc -i name_interface`
How to run an executable based on the SDK without root permissions
-------
To run an executable named EXECUTABLE_NAME without root permissions, run :
```
sudo setcap cap_net_admin,cap_net_raw+ep EXECUTABLE_NAME
```
remember to reset the capabilities on python if you use it other you can [get into trouble](https://answers.ros.org/question/366380/ubuntu1804ros2-dashing-failed-to-load-entry-point-issue/):
```
sudo setcap -r /usr/bin/python3.6
```
没有合适的资源?快使用搜索试试~ 我知道了~
Solo Quadruped 主板的 硬件和固件_设计_文档_相关文件_下载_C语言
共147个文件
lbr:23个
h:20个
jpg:15个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 10 浏览量
2022-07-06
15:37:55
上传
评论
收藏 8.53MB ZIP 举报
温馨提示
Solo Quadruped 主板的硬件和固件。 该板集中了所有传感器和执行器数据,并提供与实时计算机的有线和无线连接。 连接性: SPI:寻址多达 8 个 SPI 从机:(最大 80Mhz,支持 DMA)与 BLMC µDriver SPI 接口兼容 Wifi:通过原始 ESP-NOW 与计算机进行无线通信:127 字节消息的往返时间为 1.2 毫秒(包括驱动程序和操作系统延迟)。 以太网:通过原始帧与计算机进行有线通信:127 字节消息的往返时间为 0.2 毫秒(包括驱动程序和操作系统延迟)。 GPIO:4GPIO 免费。可以映射到I2C、UART等。其中两个目前用于通过UART进行IMU通信 UART:用于升级 ESP32 固件,正常运行 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
Solo Quadruped 主板的 硬件和固件_设计_文档_相关文件_下载_C语言
(147个子文件)
setup_esp_idf.bash 1KB
esp32_master_board.brd 223KB
esp32_master_board.brd 156KB
masterboard_main.c 20KB
uart_imu.c 10KB
direct_ethernet.c 6KB
quad_crc.c 4KB
spi_manager.c 3KB
direct_wifi.c 3KB
ws2812_led_control.c 2KB
spi_quad_packet.c 497B
esp32_master_board.cam 10KB
esp32_master_board.cam 10KB
master_board_interface.cpp 21KB
my_bindings_headr.cpp 9KB
example_pd.cpp 5KB
example.cpp 4KB
Link_manager.cpp 4KB
ESPNOW_manager.cpp 3KB
example_imu_data_collection.cpp 3KB
ESPNOW_types.cpp 2KB
motor.cpp 2KB
ETHERNET_types.cpp 1KB
motor_driver.cpp 1KB
esp32_master_board.csv 6KB
esp32_master_board.csv 5KB
seeed_BOM.csv 2KB
sdkconfig.defaults 560B
eagle.epf 4KB
eagle.epf 3KB
.gitignore 145B
.gitmodules 135B
master_board_interface.h 5KB
protocol.h 5KB
spi_quad_packet.h 4KB
motor.h 4KB
ESPNOW_types.h 4KB
defines.h 2KB
defines.h 2KB
motor_driver.h 2KB
direct_wifi.h 2KB
direct_ethernet.h 1KB
ESPNOW_manager.h 1KB
ETHERNET_types.h 1KB
Link_manager.h 1KB
spi_manager.h 982B
ws2812_led_control.h 737B
Link_types.h 686B
uart_imu.h 683B
ETHERNET_manager.h 643B
my_bindings_headr.h 596B
quad_crc.h 176B
master_board_esp32_prog_wire.jpg 1.57MB
master_board_esp32_prog_2.jpg 1.13MB
master_boards_assembled_1.jpg 293KB
master_board_delivery_1.jpg 240KB
master_board_preparation_3.jpg 196KB
master_board_preparation_6.jpg 181KB
master_boards_assembled_2.jpg 179KB
master_board_preparation_5.jpg 172KB
master_board_preparation_2.jpg 170KB
master_board_preparation_4.jpg 170KB
master_board_delivery_2.jpg 155KB
master_board_preparation_7.jpg 154KB
master_board_preparation_1.jpg 149KB
neo_pixel_pinout.jpg 77KB
master_board.jpg 38KB
IMU_vs_ENC.kst 13KB
m-pad-2.1.lbr 1.13MB
m-pad-2.1.lbr 1.13MB
con-hirose-df13.lbr 60KB
con-hirose-df13.lbr 60KB
crystals.lbr 33KB
crystals.lbr 33KB
ESP32.lbr 30KB
ESP32.lbr 30KB
MAX15062AATA.lbr 20KB
MAX15062AATA.lbr 20KB
SamacSys_Parts.lbr 16KB
SamacSys_Parts.lbr 14KB
HR911105A.lbr 10KB
HR911105A.lbr 10KB
MAX17502EATB+T.lbr 9KB
TPS560430XDBVR.lbr 8KB
TPS560430XDBVR.lbr 8KB
WS2812B.lbr 8KB
LPS4018-333MRC.lbr 7KB
LPS6235-153MRB.lbr 7KB
LPS6235-682MRB.lbr 7KB
microchip-smsc-lan8720.lbr 4KB
microchip-smsc-lan8720.lbr 4KB
LICENSE 1KB
LICENSE 1KB
Makefile 742B
Makefile 184B
BLMC_鍰river_SPI_interface.md 9KB
masterboard_communication.md 5KB
masterboard_ordering_soldering.md 5KB
README.md 3KB
masterboard_state_machine.md 3KB
共 147 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功