ros-teleop / teleop_twist_joy

Simple joystick teleop for twist robots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sometimes joyCallback function errors

jaykorea opened this issue · comments

Hello.

I ve been troubled for joycallback function errors.

As I release all buttons, motors are keep spinning.

I think intermittently "sent_diable_msg" flag doesn't change that it means

I manually added simple line to end of the joycallBack function

if (!((enable_turbo_button >= 0 &&
      joy_msg->buttons.size() > enable_turbo_button &&
      joy_msg->buttons[enable_turbo_button])) && (!(joy_msg->buttons.size() > enable_button &&
           joy_msg->buttons[enable_button])))
           { 
             geometry_msgs:: Twist cmd_zero_msg;
             sent_disable_msg = false;
             cmd_vel_pub.publish(cmd_zero_msg);
           } //Safety function

Can you give me more accurate way to debug?

Thank you

You could try plotting cmd_vel and odom to try to see what is going wrong. You can use plotjuggler or rqt_multiplot for this. It could be a joy driver issue, the joy node, teleop_twist_joy, or the wheel driver.