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
ROS_INFO("pata actual %d position %.2f", i, patas_posicion_actual);

I'm not sure, but I don't think you can just pass a std::vector to ROS_INFO(..) and expect it to print anything.

It could well be that the 0.00 you are seeing is actually just garbage memory that happens to evaluate to a 0.00 double.

Try this:

ROS_INFO("pata actual %d position %.2f", i, patas_posicion_actual[i]);

(note the [i] to index into the vector).

ROS_INFO("pata actual %d position %.2f", i, patas_posicion_actual);

I'm not sure, but I don't think you can just pass a std::vector to ROS_INFO(..) and expect it to print anything.

It could well be that the 0.00 you are seeing is actually just garbage memory that happens to evaluate to a 0.00 double.

Try this:

ROS_INFO("pata actual %d position %.2f", i, patas_posicion_actual[i]);

(note the [i] to index into the vector).