Robotics StackExchange | Archived questions

Joystick driver in ROS

I am playing with the joystick driver in ROS. It works. Except that when I stop moving the joystick around, it stops sending out cmdvels. In other words, even if the joystick is off the center position, it stops sending cmdvels. Now this is "expected" in the case when the "autorepeat_rate" parameter is set to zero.

But I have set it to a higher number and it still is happening. I believe I have isolated it to joynode.cpp in joytstickdrivers repo but I don't see a bug. I believe this is the source code: https://github.com/ros-drivers/joystick_drivers/blob/main/joy/src/joy_node.cpp

Any help will be appreciated! Here is the console output at launch:

========

PARAMETERS
 * /joy_node/autorepeat_rate: 8.00
 * /joy_node/coalesce_interval: 0.002
 * /joy_node/dev: /dev/input/js0
 * /rosdistro: noetic
 * /rosversion: 1.15.14
 * /teleop_twist_joy/axis_angular: 2
 * /teleop_twist_joy/axis_linear: 3
 * /teleop_twist_joy/enable_button: 6
 * /teleop_twist_joy/enable_turbo_button: 4
 * /teleop_twist_joy/scale_angular: 1.5
 * /teleop_twist_joy/scale_angular_turbo: 3.0
 * /teleop_twist_joy/scale_linear: 0.5
 * /teleop_twist_joy/scale_linear_turbo: 1.0

NODES
  /
    joy_node (joy/joy_node)
    teleop_twist_joy (teleop_twist_joy/teleop_node)

auto-starting new master
process[master]: started with pid [2171]
ROS_MASTER_URI=http://100.64.81.29:11311

setting /run_id to c5a730da-f891-11ec-9fc0-35161e517679
process[rosout-1]: started with pid [2181]
started core service [/rosout]
process[teleop_twist_joy-2]: started with pid [2188]
process[joy_node-3]: started with pid [2189]

Asked by pitosalas on 2022-06-30 12:36:48 UTC

Comments

Answers