ARIA-Users
Date Index
Thread Index
[Aria-users] Questions about odometry and encoder packet
- To: aria-users@xxxxxxxxxxxxxxxx
- Subject: [Aria-users] Questions about odometry and encoder packet
- From: "Nosan Kwak" <nosan-kwak@xxxxxxxxxx>
- Date: Mon, 19 May 2008 17:17:56 +0900
- Content-Type: multipart/alternative; boundary="----=_Part_21800_18916524.1211185076420"
- Delivered-To: aria-archives@activmedia.com
- Delivered-To: aria-users@server.local.net
- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; bh=BZGtrL8EKHW/NccEpOpG658Hoesfa40NYSdBKmbNqHg=; b=s6+cF7dwepFpjt0GgEJfHoDLq1jnIHdy7yarq3ocCIE0gk5GVU8tGPqFwkv09VyCUTyf3jjhcalEHsTg4JeKIghFGGVYQ9yy3E7dPgE7v2sS51Ab98R/6q5jQkPFHlMHqmFGmEcJjWiIdAFUbxcNhibdicdT5gp6v+x969ZrDoU=
- DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=kXOEeIe3p7pfF7eg4MCrHr+b3qSUI4ibW1a7b7HKPgs9nncTEGD/+aeXD/xTu27RPOQFVBaPP+dLL33pEAQYZoa9XHLNPmFo85h8bKL/X8fpvQb3B3ycucs4qTV7ry2RYttb1rWVR1uEZZNGv9IAyrSmIf0AwwgUX0WikP/fQCI=
- Resent-Date: Mon, 19 May 2008 05:21:47 -0400 (EDT)
- Resent-From: aria-users@xxxxxxxxxxxxxx
- Resent-Message-ID: <D-XGMB.A.8sG.qaUMIB@server.activmedia.com>
- Resent-Reply-To: aria-users@activmedia.com
- Resent-Sender: aria-users-request@xxxxxxxxxxxxxx
- Sender: nosanr@xxxxxxxxx
Hello.
I'm using PowerBot.
I have some questions about odometry.
1. For some reason, I made a code to get Encoder data after calling requestEncoderPackets()
myRobot->lock();
long int LeftEncoder= myRobot->getLeftEncoder();
long int RightEncoder= myRobot->getRightEncoder();
myRobot->unlock();
My code received the encoder data and printed them.
But, the data were okay until 32667 or -32667.
After the robot moved more than 32,667 encoder count, the next encoder count is -30000, and vice versa (from -32,000 to 320,000).
In the manual, the type of each encoder count is long int, that is, 4 bytes. right?
Then, how come this happens?
2. For some reason, I made a code to get each wheel angle of the robot incrementally.
First, I used getPose function in ArRobot.
And, I used getLeftEncoder and getRightEncoder data without gyro (I temporarily fixed the first problem above).
But, the two results (each wheel angle) are different.
When using getLeftEncoder and getRightEncoder data, I don't use any RevCount, TicksMM.
I guess getPose() uses RevCount and TicksMM. In my code, TicksMM is almost the same to the one in the PowerBot configuration.
So, I checked RevCount, but I don't understand how to compute the RevCount.
In the configuration, it's 25500. When the robot rotates 180 degree, in my opinion, it can be computed as
PI*(Wheelbase/2)*TicksMM~3.14*330mm*110= 113982.
Am I wrong? I guess I'm misunderstanding in some parts.
And, is the RevCount the reason why the two approaches (getPose and getLeftEncoder) are different?
Please tell me them.
Thank you.
Sincerely,
--
/*!********************************************************************
Nosan Kwak
**********************************************************************/