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

[crystal] Is there a limit on the array.resize?

asked 2019-02-11 20:36:36 -0500

Obeseturtle gravatar image

When I try to resize a embedded array only 128 values are printed. After the 128 values, a '...'] is shown. This is when using ros2 topic echo.

Is this to be expected?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-02-12 02:44:57 -0500

gvdhoorn gravatar image

updated 2019-02-12 02:46:12 -0500

Is this to be expected?

Yes, and it is also not a limit to array/list/sequence sizes in the message format (as your question seems to imply), but a usability feature.

The ROS 2 rostopic CLI tool by default will not print full length arrays for lists/arrays/sequences longer than 128 elements to prevent "runaway" terminals (where you are waiting 5 minutes for rostopic to quit after having rostopic echod a topic carrying PointCloud msgs fi).

You can disable/change this behaviour in two ways:

  1. provide an alternative value with the --truncate-length option (here)
  2. add --full-length to your echo invocation (here)

Note that this is similar to rostopic echo's --noarr in ROS 1 (although that didn't allow you to specify a limit to the nr of elements it did print).

edit flag offensive delete link more

Comments

Thank you for the information, I will try the above mentioned changes.

I was hopping to ask another question relating topic echo. Embedded custom messages are not being printed with ROS2 topic echo but, if I create a subscriber, the messages are properly being received. Is this a setting issue?

Obeseturtle gravatar image Obeseturtle  ( 2019-02-13 19:50:25 -0500 )edit

That would seem to be a different question. Posting follow-up questions in comments on answered questions is not a good idea, as they have very limited visibility and will be hard to find for future readers.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-14 01:22:18 -0500 )edit

Yea, sorry about that. I was just thinking that it might be related the rostopic echo setting as well. That is why I was debating whether to ask a different question or post it here. Thank you for your answer though.

Obeseturtle gravatar image Obeseturtle  ( 2019-02-14 02:39:54 -0500 )edit

No problem.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-14 02:41:52 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-02-11 20:36:36 -0500

Seen: 476 times

Last updated: Feb 12 '19