Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

Locator Data when motor is not on #17

Open
DarrenGuinness opened this issue Dec 8, 2015 · 3 comments
Open

Locator Data when motor is not on #17

DarrenGuinness opened this issue Dec 8, 2015 · 3 comments

Comments

@DarrenGuinness
Copy link

Hi there, I am working on some applications that use the locator data stream on the Ollie, and noticed that I can see the movement of the locator fine when the motor is on, but when the motor is off only backwards motion adjusts the locator values. Meaning that if you push the device forward the location does not change, but if the device is pushed backwards the location values do change. Is this supposed to happen? Or Is there any way I can get locator values in all directions when the motor is not turned on?

@DarrenGuinness
Copy link
Author

Just a clarification, the locator values do work in all directions if the motor is never started. But once the motor has been used once and then stopped, the locator values only go in the backwards direction.

@iamcgn
Copy link

iamcgn commented Mar 4, 2016

Hi Dronious,
Thanks for reaching out about this issue. I'm going to look into it and will let get back to you. Thanks for your patience.

@DarrenGuinness
Copy link
Author

DarrenGuinness commented Oct 6, 2016

I found a workaround that seems to solve the issue. This seems to fix the sensor issue in both the odometry, and backEMF readings.

It appears that the motors are being reset to the forward direction when any roll, rawMotorCommand, or stop command has been issued which means that the back electromotive force can only be read in one direction (opposite of forward with respect to the robot). The proposed workaround sets the each of the motors to a very low power in opposite directions effectively allowing the robot to read both forward and backward motions again and needs to be called after each motor command to reset the sensor readings.

``
var resetMotors =function()
{
ldirection=0x01; //set to observe forward motion
rdirection=0x02; //set to observe backward motion
power = 1; //very low power
var opts = {
lmode: ldirection,
lpower: power,
rmode: rdirection,
rpower: power
}

orb.setRawMotors(opts, function(err, data){

});

}
``

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants