ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There are a few problems with your code, which potentially crashes your node:
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.
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];