ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I'm assuming this is C++.
Most likely out.axes
-- a std::vector
-- currently has a zero-length, and you're trying to assign values to the first and third element. That leads to your program trying to access memory it does not have access to, which leads to SEGFAULT
s. See std::vector - operator [].
You either have to use .reserve(..)
, use .push_back(..)
or use one of the c'tors of std::vector
that initialises it with sufficient capacity.