HoEmpire / NewIO

New version of IO for ZJUDancer
1 stars 0 forks source link

NewIO

New developing version of IO for ZJUDancer

Pre-Requirement

How to build

Serial ports config

We use udev rules to change the access permissions to devices, set port corresponded to our port names used in code.

Generally, the serial port mapping are listed below:

For instant setup for usage, you can put the 99-dancer-serial.rules to /etc/udev/rules.d, and put the change_timer.sh to etc/zjudancer/hardware, then give executive permission to this file: sudo chmod +x change_timer.sh .

If one day the hardware is changed, you should learn to change the rules according to new features, hope you can get some suggestion from the below figure.

udev_rules

Tips

  1. All IO is finished
  2. Read the description function of the code in
    • src/dmotion/include/dmotion/IO/SeroIO.h
    • src/dmotion/include/dmotion/IO/IOManager.h
    • src/dmotion/include/dmotion/IO/FeetSensorIO.h
    • src/dmotion/include/dmotion/IO/IMUReader.h
  3. example show how to use servo and iomanager and the sensors to read and write Servo
  4. if it's the first time that you used this code, make sure you have checked the Macro definition in the following files is correct(especially the port and baud rate)
    • src/dmotion/src/IO/SeroIO.cpp
    • src/dmotion/src/IO/IOManager.cpp
    • src/dmotion/src/IO/FeetSensorIO.cpp
    • src/dmotion/src/IO/IMUReader.cpp
  5. In the issue some solutions of some tricky bugs is recorded.

What's new

Run a test