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

Revision history [back]

The angle information (angle_min, angle_max, angle_increment) in your republished message are all zero. Looking at the code that most likely happens because you have not specified the parameter fov correctly, so your internal variable field_of_view gets set to 0 per default.

The angle information (angle_min, angle_max, angle_increment) in your republished message are all zero. Looking at the code that most likely happens because you have not specified the parameter fov correctly, so your internal variable field_of_view gets set to 0 per default.

/edit: You can compute the field_of_view from the data you already have:

msg.angle_min = angles::from_degrees(-field_of_view / 2.0);
msg.angle_max = angles::from_degrees(field_of_view / 2.0);
msg.angle_increment = angles::from_degrees(field_of_view / BEAM_COUNT);

For instance, we know that BEAM_COUNT is 16, so computing field_of_view is straightforward.

The angle information (angle_min, angle_max, angle_increment) in your republished message are all zero. Looking at the code that most likely happens because you have not specified the parameter fov correctly, so your internal variable field_of_view gets set to 0 per default.

/edit: You can compute the field_of_view from the data you already have:

msg.angle_min = angles::from_degrees(-field_of_view / 2.0);
msg.angle_max = angles::from_degrees(field_of_view / 2.0);
msg.angle_increment = angles::from_degrees(field_of_view / BEAM_COUNT);

For instance, we know that BEAM_COUNT is 16, so computing field_of_view is straightforward.straightforward. Computing it from the other two statements is even easier.