ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are a few problems with your code, which potentially crashes your node:

  1. Are you sure the joyMsg in the callback joy2chan always has a fixed number of axes and buttons? I saw that you always trying to read 11 (or 12?) elements from the array.

  2. This part of your code is confusing: for (i = 0; i <= 11; i++) ... Are you trying to say that there are 12 elements? Because you only declare double input[11];