Skip to content

Commit

Permalink
add deadzone param workaround to teleop.rst (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
aparker-fetch authored and erelson committed Feb 8, 2019
1 parent 11e1c27 commit e5fa7d4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions source/teleop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,25 @@ USB cable, and then running:

This situation is most often caused by charging the robot joystick from
the USB port of another computer.

Using Deadzone Parameter to Correct Drift
-----------------------------------------

Some controllers have poorly-zeroed joysticks, meaning that they send a nonzero
value when the joystick is untouched and ought to send a zero value. This will be
apparent if you press the deadman button on the controller, and the robot slowly
moves without any input to the joysticks.

This behavior can be compensated for by using a rosparameter: **joy/deadzone**
(`ROS docs <http://wiki.ros.org/joy#Parameters>`_), which defines the amount by
which the joystick has to move before it is considered to be off-center, specified
relative to an axis normalized between -1 and 1.

Add/set the parameter in ``/etc/ros/DISTRO/robot.launch``::

<!-- Teleop -->
<include file="$(find fetch_bringup)/launch/include/teleop.launch.xml"/>
<param name="joy/deadzone" value="0.1"/>

You can inspect the output of ``rostopic echo /joy`` with the controller
connected to choose an appropriate value for your controller.

0 comments on commit e5fa7d4

Please sign in to comment.