Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete packet_finder in kobuki_driver #172

Closed
yhju opened this issue Nov 22, 2012 · 7 comments
Closed

Incomplete packet_finder in kobuki_driver #172

yhju opened this issue Nov 22, 2012 · 7 comments

Comments

@yhju
Copy link
Contributor

yhju commented Nov 22, 2012

Sometimes packet_finder in kobuki_driver retrieve over-sized byte stream, or misaligned byte stream.

@yhju
Copy link
Contributor Author

yhju commented Nov 26, 2012

It was problem of ecl_formatter, not packet_finder.

I temporally disabled it in 3d455c0

Done.

@yhju yhju closed this as completed Nov 26, 2012
@stonier stonier reopened this Nov 26, 2012
@stonier
Copy link
Member

stonier commented Nov 26, 2012

Young Hoon, when you find a bug, don't disable and close it as a solution. That is not bug hunting, that is bug avoiding.

This bug will now appear for someone else in another program, which means, people have to debug again.

Start providing hints. At the very least, start a new issue in ecl_core with information.

  • What error was occuring?
  • Was it formatter or was it just the use of formatter?
  • Do you have a simple test program that can reproduce it?

@ghost ghost assigned yhju Nov 26, 2012
@yhju
Copy link
Contributor Author

yhju commented Nov 27, 2012

Actually,

In my opinion, the bug is here.

follower member variable of ecl::PushAndPop is not always zero, but ecl::formatters::ByteArrayFormatter always reads buffer( or container) from zero.

@stonier
Copy link
Member

stonier commented Dec 3, 2012

Formatters fixed in stonier/ecl_core#1

@stonier stonier closed this as completed Dec 3, 2012
@stonier stonier reopened this Dec 3, 2012
@stonier
Copy link
Member

stonier commented Dec 3, 2012

The problem I suspect isn't solved - it just isn't being troubled by formatter anymore.

I think the problem is because PushAndPop has a rollover policy. i.e. if it is full, it automagically pops the first element. This will cause serial packets to be misaligned.

If you find a robot on which this happens alot, let's cout the buffer.size() value to see if it's full.

@stonier
Copy link
Member

stonier commented Dec 3, 2012

In particular - buffer variable in PacketFinder. It is set to a size equal to:

  buffer = BufferType(size_stx + size_length_field + size_max_payload + size_checksum_field + size_etx);

Currently size_max_payload = 256. This may not be big enough. Again, do logging to work out how full buffer is getting.

@stonier
Copy link
Member

stonier commented Aug 20, 2013

Conclusions - PushAndPop should provide some warning when it's overwriting old data.

Practically, it needs a large enough buffer size for the driver to work with so that tdoesn't happen often.

Leave the warning flag for later. We have notes about this now here that is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants