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

Rosserial PoseArray crashes when more than 8 poses are used?

asked 2016-12-01 09:52:17 -0600

Ampul3x gravatar image

Hey there, i am using rosserial on windows to send poseArray data through a ubuntu pc. Works fine until i want to send more than 8 poses in one array. For example when i do this

geometry_msgs::PoseArray* posArray = new geometry_msgs::PoseArray();
posArray->poses_length = 25;
geometry_msgs::Pose* helpPosArray = new geometry_msgs::Pose[25];
posArray->poses = helpPosArray;

Other values in the code are overwritten with nonsense values and the program crashes with access violation errors. It seems like the memory is filled with something big that the other values are overwritten, or the access to the memory is faulty. The overwriting only happens when i try to publish the posArray.

pub.publish(posArray);

When i dont publish or when i change the length to:

posArray->poses_length = 8;

Everything works fine. Is the rosserial server limitated so that only 8 pose values are possible for one publisher? It would help me a lot if you have answers :)

Greetings

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-12-02 02:54:16 -0600

Ampul3x gravatar image

updated 2016-12-02 07:19:44 -0600

If anyone is interested,i am closer to the solution. I changed the buffersizes in node_handle.h to 4096. This allows me to store 17 entries (posArray->poses_length = 17;). Values above 17 are not causing a crash anymore but the topic is empty then. I guess i have to split my 25 entries into two publishers one with 17 and one with 8

Cheers

EDIT: Now i see that the Problem lies in the receive buffer. The rosserial terminal shows the following error messages with poseArrays above 17 entries:

Requested to read 1032 bytes, but buffer capacity is only 1023.

Overrun on receive buffer. Attempting to regain rx sync.

Can i somehow increase the receive buffer?

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-12-01 09:52:17 -0600

Seen: 315 times

Last updated: Dec 02 '16