Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sudden robot movements at first initialization of ROS, during each time when the robot is switched on #17

Open
padhupradheep opened this issue Jan 16, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@padhupradheep
Copy link
Member

After long non-usage of the Logitech joystick, the analog sticks on them, moves from their 0 position, due to which there is a sudden motion of robot. To avoid this, a possible deadband region needs to be added..

@padhupradheep padhupradheep changed the title add a deadband region to handle sudden robot movements add a deadzone region to handle sudden robot movements Jan 23, 2023
@padhupradheep
Copy link
Member Author

@padhupradheep padhupradheep changed the title add a deadzone region to handle sudden robot movements fix sudden robot movements Feb 6, 2023
@padhupradheep
Copy link
Member Author

padhupradheep commented Feb 6, 2023

We investigated further and found that, the initial value for all the axes in the D-Mode is set to -32767, which then in turn is scaled to -1.0 by the joy node. For X-Mode, the values of all the axes are set to 0.

Fix for now / work around:
For the first instantiation of ROS, during each time when the robot is switched on, it is very essential that, the axes of the joystick are moved in all the possible direction, before starting the operation (i.e. more specifically before touching the deadman button). This would indeed bring the axes values to 0 or close to 0 (not a problem, since we have a deadzone attached to it)

Areas to investigate:
We should probably further look into the drivers of the joystick for Ubuntu 22.04 (problem started only from here, as far as I can remember) and the joy node from ROS Drivers, to probably find a way to induce or inject 0 as the initial value.

Note that, on pressing the deadman button, the axes values are triggered to 0. But the joy node does not read the axes values when they are triggered, since they do event based handling. Therefore the axes values are not reset, which eventually raises the need for manual reset of these values. Manual reset is as said, it is just moving the axes in all possible directions.

CC: @neomob @neopar

@padhupradheep padhupradheep changed the title fix sudden robot movements fix sudden robot movements at first initialization of ROS, during each time when the robot is switched on Feb 6, 2023
@padhupradheep padhupradheep added the bug Something isn't working label Feb 6, 2023
@padhupradheep padhupradheep pinned this issue Feb 6, 2023
@neojaw
Copy link
Member

neojaw commented Feb 7, 2023

I'm on Ubuntu 20.04 and I also get the -32767 as initial values, i.e. with a freshly connected joystick on D mode. So at least on driver side this behaviour has been around for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants