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

Revision history [back]

If you #define x 0 then twist.linear.x is going to turn into twist.linear.0 after the preprocessor.

Don't #define single characters unless you hate happiness.

More here: #defines are EVIL

If you #define x 0 then twist.linear.x is going to turn into twist.linear.0 after the preprocessor.

Don't #define single characters unless you hate happiness.

More here: #defines are EVIL

As an aside, if you look at your preprocessor output, you'll find that your variables like max_pid are actually going to be ma0_pid and so on and so forth...

If you #define x 0 then twist.linear.x is going to turn into twist.linear.0 after the preprocessor.

Don't #define single characters unless you hate happiness.

More here: #defines are EVIL

As an aside, if you look at your preprocessor output, you'll find that your variables like max_pid are actually going to be ma0_pid and so on and so forth...forth... So yeah, don't ever do this.