smartMotro馬達驅動,含速差計算。
執行於python3,下為建立python3虛擬環境的參考
sudo pip install virtualenv virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
source ~/.profile
mkvirtualenv cv -p python3
Reference: https://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html https://goo.gl/PdTF9o
- wheleDistance 兩輪間之距離(單位 公尺)
- wleleRadius 輪半徑(單位 公尺)
- 使用usb2RS232,裝置預設在/dev/ttyUSB1,鮑率 9600
- 有另外建立一 smartMotor 類別,專司與馬達通訊。
digraph graphname {
T [label="smartMotor" , fontcolor=Red, fontsize=24, shape=box] // node T
P [label="Controller" color=Black, fontcolor=Red, fontsize=24, shape=box] // node P
usb [label="USB to RS232" color=Black, shape=box]
sm [label="SmartMotor馬達",shape=box]
{rank=same;T P}
T->P [label="call", fontcolor=darkgreen] // edge T->P
T->usb[label="/dev/ttyUSB1"]
usb->sm
}
http://blog.csdn.net/heyijia0327/article/details/47021861
- 控制example github他人寫的相似package
- move_base教學 http://blog.csdn.net/heyijia0327/article/details/41823809
- 馬達控制參考
馬達給定數值,如要每秒轉一圈,則給於 32768 。
V --> 1rps=60rpm=>32768
最新版請看 https://hackmd.io/s/SyFSnjY6 ROS-Bot計畫 https://hackmd.io/s/SJRJLO4a