Segway RMP 50XL Odometry value problem

RMP 50, 50XL, 100, 200, 400
Post Reply
phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

I will post it on the forum when I get in tomorrow morning.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

I am trying to upload the demo but there is a problem with the forum server permissions. We are attempting to get it fixed, I should be able to post it today. Sorry for the delay.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Did you manage to upload it? I don't see it in this thread, but maybe the files are somewhere else in the forum.

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Hi Patrick,

I checked the code. The conversion value for the integrated forward position in the code (3085.92counts/m) does not match to the documentation (33216 counts/m); and neither of them matches to the reality which is ~15000.

For the Integrated Turn Position the code and the docs have the same values but again not the correct value.

For the odometry I think I will just multiply the values that I've found by running the robot on a straight line and turning around itself.

I have 2 small questions to close the topic:

1- What is the unit of the velocity command that I need to provide to the platform? Do I need to provide the speed as m/s or counts/s. The docs says 147cnts/mph in the interpretation coulumn with no further explanation.

2- When I tell the robot to turn around itself with no linear velocity, after 4-5 turns I see that its position is changed by ~10cm. Is this behavior normal and common on segways?

Thanks

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Following up my previous post.

About the odometry:
I made the platform go forward one wheel turn.

The number of counts that it ran are: Left: 23880 and Right: 24632. The platform moved 1.46m, which makes 16356.16 counts/m
The Documentation says that it should be 33216 cnts/m
The latest demo code says that it should be 3085.92758778538392 cnts/m

About the speed:

The doc indicates to send a value between -1024 and 1024 with header 0x0413 to the platformfor the rotation. The graph on the following page indicates a maximum angular velocity of 3.14rad/s when the platform is stationary. By sending the platform 1024/10 the platforms move at 1.08rad/s rather than the expected 0.31415.

edit:

It seems that the relationship between given command and wheel velocities is not linear. I have given 4 different linear velocity command values and measured the reported counts/s. Here are what I got:

Command: 75 Wheel vel: 3560.51 counts/s
Command: 150 Wheel vel: 7491.38 counts/s
Command: 300 Wheel vel: 23786.91 counts/s
Command: 600 Wheel vel: 59162.60 counts/s

Is there an input-output equation that is not listed in the docs?

I wonder if there is a problem with my platform or its encoders....

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

About the odometry:
I made the platform go forward one wheel turn.

The number of counts that it ran are: Left: 23880 and Right: 24632. The platform moved 1.46m, which makes 16356.16 counts/m
The Documentation says that it should be 33216 cnts/m
The latest demo code says that it should be 3085.92758778538392 cnts/m

Sorry the demo code conversion was wrong. There was a an unused #define in the code that gave the conversion from counts to ft and I mistakenly used that. I updated the conversion factor and ran your same test (commanding 1 wheel revolution (1.45229m) and verifying the wheel infact turned 1 revolution and reported ~49698 cnts for the linear travel)

The conversion factor should be 34220.578.
The doc indicates to send a value between -1024 and 1024 with header 0x0413 to the platform for the rotation. The graph on the following page indicates a maximum angular velocity of 3.14rad/s when the platform is stationary. By sending the platform 1024/10 the platforms move at 1.08rad/s rather than the expected 0.31415.
I am not sure what documentation you have but the yaw rate command is calculated as

#define DIFFERENTIAL_WHEEL_COUNTS_PER_RAD_PER_SEC (179.286858159557)
#define YAW_RATE_LIMIT_RAD_PER_SEC_F (3.14)
#define YAW_RATE_LIMIT (YAW_RATE_LIMIT_RAD_PER_SEC_F * DIFFERENTIAL_WHEEL_COUNTS_PER_RAD_PER_SEC ) // = 562.96;

so the command would then be:
float yaw_cmd_f = 0.0;
float yaw_cmd_scale =0.0;
float yaw_limit_sf = 12.0; (this value gets initialized to 12 on the platform so 75% max yaw rate)
short yaw_cmd =0;

yaw_cmd_f = 0.5; //-1.0...1.0 this comes from your input;
yaw_cmd_scale = (YAW_RATE_LIMIT * (yaw_limit_sf / 16.0));
yaw_cmd_f *= yaw_cmd_scale;
yaw_cmd = (short) yaw_cmd_f;

all of this was in the demo I posted in the function OnTimer(TIMER_ID_JOYSTICK). For implementation of the input mapping see the function turn_cmd_to_diff_wheel_cnts in the demo.
It seems that the relationship between given command and wheel velocities is not linear. I have given 4 different linear velocity command values and measured the reported counts/s. Here are what I got:

Command: 75 Wheel vel: 3560.51 counts/s
Command: 150 Wheel vel: 7491.38 counts/s
Command: 300 Wheel vel: 23786.91 counts/s
Command: 600 Wheel vel: 59162.60 counts/s

Is there an input-output equation that is not listed in the docs?
I am not sure what variable you were watching. If you watch the wheel velocity variables (id:0x402 LW Velocity and RW Velocity (slot 0 and 1)) you should see the output match the command:

#define WHEEL_COUNTS_PER_METER_PER_SEC (332.166481073751)
#define VEL_LIMIT_METER_PER_SEC_F (3.576)
#define VEL_LIMIT (VEL_LIMIT_METER_PER_SEC_F * WHEEL_COUNTS_PER_METER_PER_SEC ) //= 1187.83;

so the command would then be:
float vel_cmd_f = 0.0;
float vel_cmd_scale =0.0;
float vel_limit_sf = 12.0; (this value gets initialized to 12 on the platform so 75% max vel)
short vel_cmd =0;

vel_cmd_f = 0.5; //-1.0...1.0 this comes from your input;
vel_cmd_scale = (VEL_LIMIT * (vel_limit_sf / 16.0));
vel_cmd_f *= vel_cmd_scale;
vel_cmd = (short) vel_cmd_f;


so repeating your test using:

wheel_vel_cnts = (left_wheel_vel+right_wheel_vel) / 2;
The command matches the wheel velocity with some error (it is a closed loop control system it will not match exactly).
I wonder if there is a problem with my platform or its encoders....
There are many layers of fault detection to catch faulty hall sensors. Your machine will not run if there is something wrong with the motor hall sesnor feedback. It seems likely that you are not interpreting the data and commanding the machine appropriately. I have attached the demo with corrected values. I have also verified all the feedback with physical experiments.
You do not have the required permissions to view the files attached to this post.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Thank you for the answer Patrick.
Sorry the demo code conversion was wrong. There was a an unused #define in the code that gave the conversion from counts to ft and I mistakenly used that. I updated the conversion factor and ran your same test (commanding 1 wheel revolution (1.45229m) and verifying the wheel infact turned 1 revolution and reported ~49698 cnts for the linear travel)
With one right wheel turn here is the content of the package 0x0403. It is a serial connection. And the packages are USB packages.

0xF0 0x55 0xAA 0x3F 0x80 0x60 0xFE 0x8F 0x08 0x60 0x37 0x00 0x00 0x60 0x8B 0x00 0x00 0xD5

Page 14 of User Interface Guide v2.2 tells me to parse this package this way:

Byte 0 - Value: 0xF0 - (Start Byte) ---- OK
Byte 1 - Value: 0x55 - (Can Identifier) ---- OK
Byte 2 - Value: Ignore on read ---- Skipped
Byte 3 - Value: Ignore on read ---- Skipped
Byte 4 and 5 Can Message Header High+Low 11 bits valid ----- 0x8060 ignore last 5 bits ---> 0x403 OK
Byte 6 and 7 For send command ---- Skipped
Byte 8 Ignore ----- OK
Byte 9-16 The data
Byte 17 Checksum --- OK it matches.

For 0x403 Byte 13-16 is the integrated right wheel displacement --> 0x60 0x8B 0x00 0x00

With low and high the order becomes Byte 15 Byte 16 Byte 13 Byte 14 ---> 0X0000608B = 24715 counts

So I get a very different number then yours :-/

I don't know what is inside the canlib library in the demo program since it's a closed source library.

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

It looks like you are parsing it correctly as far as I can tell. I have attached a version of the old demo that supports USB. An important note is that the FTDI driver in the old architecture systems are not supported beyond windows XP, there are known issues with VISTA and 7 compatibility. That being said I assume you are using XP.

Could you please perform the following test:

1. put the RMP on a stand (wheels off the floor)
2. place a marker (like a piece of tape) on the wheel and some reference point (to measure one revolution)
3. connect USB to the platform
4. power the RMP on
6. open the rmi_demo.exe program
5. in the Vel Cmd (cnts) window in the bottom right corner type 100
6. when the wheel has gone 1 full revolution type 0
7. record the values for integrated left, right, and for/aft travel.
8. take a screen shot, post it and the values recorded

If you are still having a problem there may be something else going wrong with the machine. I will have Chris contact you to either send the machine up or discuss the possibility of upgrading your machine to the new system architecture (which I would recommend).
You do not have the required permissions to view the files attached to this post.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Ok I run the demo program and did what you said. After one complete wheel turn, the values are following:

Int left: 24636
Int Right: 24886
Fore/Aft Dist: 24620
Int Yaw Pos: 0.694

I also attached the screenshot.

I guess at this point I should contact Chris and send you the machine....
You do not have the required permissions to view the files attached to this post.

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

Yes there must be something else going on. I will talk to Chris tomorrow morning a figure out what the options are.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

Some good news, I did a little more digging and it seems that your machine has the old RMP50 code installed. I loaded that code on a machine here and had all the same results that you did. I will be sending you an updater package which should fix all of your issues.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Yes, all problems seem to be gone. The update fixed all issues.

Thanks.

ChrisC
Posts: 43
Joined: Fri Apr 20, 2012 8:22 am

Re: Segway RMP 50XL Odometry value problem

Post by ChrisC »

Follow-up question regarding this issue:
"As you would recall we had a firmware problem that was solved with a firmware update. Now each time I remove the batteries, I have to reapply the update. Is there a permanent way to update the firmware?"

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

The firmware should not be affected when the battery is changed. The process to change the flash state on the CU processor requires a series of secure hardware and software steps.

Could you please send some data logs (raw and interpreted)? The build ID is contained within message 0x0400 data_word0 (see attached) to see if the software is infact altered after changing the battery.
GenII RMP50 Feedback Data.pdf


I suspect that something else is going on and need more information to help.

Thanks,

-Patrick
You do not have the required permissions to view the files attached to this post.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Hi Patrick,

Sorry for the late reply.

I just changed the batteries and the build ID is: 0x0BEA

With decimal conversions:
Build id: 3050
Build date: 1550
Build time: 2850


Akin

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

3050 is the latest release for the RMP50XL, so I do not think that changing the battery is altering the firmware in the platform. There must be something else going on. If you can run a test I will have someone run it in parallel at Segway.

Run the machine at 0.5 m/s for 1m. Measure the distance traveled.

Change the battery to cause the issue:

Re-run the test and measure the distance again.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Hi Patrick,

When I run the platform at 0.5m/s for 2.05m the odometry reported me 1.017m displacement. The behavior is very same as if I hadn't updated the firmware.

When I update the firmware I follow these update instructions:
1- Update User Interface firmware -- load .bin file

2- Update POwerbase firmware -- load .rex file then load .bin file


I wonder my update procedure is wrong. Should I only do the step 2, since it also updates the interface in the end?

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

The build information on the machine is the latest release after you removed the battery and experienced the issue; indicating there no effect on the firmware due to removing the battery. We will try and replicate it at Segway to see if it is reproducible.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Hi Patrick,

Any luck on producing the same behavior?

Akin

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

I have just run testing and reproduced the behavior, but I need a little time to figure this one out. I will get back to you later today with a status.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

Hi Akin,

I have identified the issue and the fix. It turns out that you found a bug that has existed since the codebase creation ~10 years ago. Thank you for pointing it out. I will be fixing it and posting a release tomorrow as well as an answer to your question about the propulsion and aux battery state of charge. I will also give an explanation of the bug. We are committed to resolving this issue for you.

Keep in mind that these issues only exists in the deuce board based platforms which have not been actively supported or maintained in the last few years. You might consider upgrading your platform to the new architecture which is much more robust, feature rich, and fully supported and maintained. Chris can provide details if you are interested.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Akin
Posts: 24
Joined: Mon Aug 13, 2012 12:21 pm

Re: Segway RMP 50XL Odometry value problem

Post by Akin »

Hi Patrick,

I look forward to get the new firmware. Will it be available at the forum, or is there an other address that I should go?

Yes I might be interested in upgrading the platform. I would be happy if Chris can give me the details.

Best

Akin

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

It will be posted in the morning, it has taken a bit longer because I have also updated all the tools and demo to work with the newest version of windows and the newest USB drivers.
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

phussey
Posts: 79
Joined: Fri Apr 20, 2012 8:12 am

Re: Segway RMP 50XL Odometry value problem

Post by phussey »

The new release is on the forum, let me know if you have any issues or questions.

http://rmp.segway.com/viewtopic.p ... p=305#p305
PATRICK HUSSEY
Principal Engineer

STANLEY INNOVATION, INC
www.stanleyinnovation.com

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests