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
  1. You could pause outside of a callback, if you really need to; store the value you will add to the vector in the callback.
  2. By using simulation time you can make your clock server pause, just like you pause a ROS bag from being played.

For debugging reasons (this one is a clear case of this, from your coimments) you should really use a debugger, not print the contents of a vector. You will be glad you did it if you put some time into it. Super easy if you have an IDE (for gdb see this).

First of all start here. If you find yourself really needing to use a launch file, such that you can't run your node from the IDE, maybe your IDE provides a way to attach the debugger to the already running node.

  1. You could pause outside of a callback, if you really need to; store the value you will add to the vector in the callback.
  2. callback.
    1. By using simulation time you can make your clock server pause, just like you pause a ROS bag from being played.

For debugging reasons (this one is a clear case of this, from your coimments) comments) you should really use a debugger, not print the contents of a vector. You will be glad you did it if you put some time into it. Super easy if you have an IDE (for gdb see this).

First of all start here. If you find yourself really needing to use a launch file, such that you can't run your node from the IDE, maybe your IDE provides a way to attach the debugger to the already running node.

  1. You could pause outside of a callback, if you really need to; store the value you will add to the vector in the callback.
      callback.
    1. By using simulation time you can make your clock server pause, just like you pause a ROS bag from being played.

For debugging reasons (this one is a clear case of this, from your comments) you should really use a debugger, not print the contents of a vector. You will be glad you did it if you put some time into it. Super easy if you have an IDE (for gdb see this).

First of all start here. If you find yourself really needing to use a launch file, such that you can't run your node from the IDE, maybe your IDE provides a way to attach the debugger to the already running node.