Log in

View Full Version : passive reading speed and position


kamocat
23-07-2010, 21:12
I'm trying to record speed and position of the jaguars, for motion tracking purposes. (I want the robot to record its location)
I'd like this to happen regardless of the control mode or enabled state of the motor. It's just a status command, so it should work, shouldn't it?

It doesn't appear to.

I've opened each Jaguar in voltage mode, and set the number of encoder lines, and done a position reference and a speed reference. screenshot (http://content.screencast.com/users/kamocat/folders/Jing/media/defbe5a1-da70-4b5b-9002-888f6b8f9afc/position%20and%20speed%20status.png) (I overrode the logic (http://content.screencast.com/users/kamocat/folders/Jing/media/984e50b9-0d8e-4f9d-a87e-0a74fe95b382/overrode%20the%20logic.png) so that the speed and position referencing will happen regardless of the mode.)

This is an important issue in the usability of CAN.

Radical Pi
24-07-2010, 00:17
Have you checked if the values show up in BDC-COMM? I remember that the current was being actively updated in there (and I was checking it through the robot too). I see nothing in the Jaguar firmware that would prevent it from sending those status messages, nor in the C++ code.

kamocat
24-07-2010, 14:17
I'll double-check.
I know that current is updated regardless of mode, but I'm pretty sure the speed and position were not.

EDIT:
I found some interesting results.
Speed and position are not initially reported in Voltage mode. However, after enabling that mode, and then going back, it appears to work.
I'll see if I can repeat this with my code.

EDIT2:
It works with my code just fine. The Driver Station doesn't even need to be connected. Note that "position reference" and "speed reference" are still both necessary. (I tried moving the wheel while speed referencing, but it didn't seem to make a difference; it still referenced 0 as stopped.)

kamocat
24-07-2010, 14:53
Anyways, we have a workaround now.

Can I still file a bug report?