Skip to content

HoEmpire/NewIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NewIO

New developing version of IO for ZJUDancer

Pre-Requirement

  • ROS is a must for IOManager and the other part.BUT ist not necessary ServoIO.

How to build

  • This is a ROS workspace use the following code to build
 catkin_make
 source devel/setup.zsh

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:

  • ttyUSB0---> Servo
  • ttyUSB1---> IMU

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
  1. example show how to use servo and iomanager and the sensors to read and write Servo
  2. 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
  1. In the issue some solutions of some tricky bugs is recorded.

What's new

  • you can find it yourself

Run a test

  • There are some examples that you can use roslaunch to test
 roslaunch dmotion ...    #servo_read.launch or servo_write.launch or IOManager_read_write.launch
  • make sure you have the authority of the USB port,use the following code in terminal to get authority
 sudo chmod 666 /dev/ttyUSB0     #sometimes it's not USB0

About

New version of IO for ZJUDancer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages