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

It crashes #22

Open
jbcolme opened this issue Dec 16, 2015 · 3 comments
Open

It crashes #22

jbcolme opened this issue Dec 16, 2015 · 3 comments

Comments

@jbcolme
Copy link

jbcolme commented Dec 16, 2015

I cannot use it. It keeps crashing. I went through the code, and at the main function of the node, found that for every spin (in the while(ros::ok()) loop) you define a new ptu and connect to it. I put this outside the loop and everything worked.

@mikepurvis
Copy link
Member

Hmm, that sounds like it'd be really bad if it was the case, but I think there's something else going on here. The while(ros::ok()) in the main function is intended to be a connection-retry loop— upon successful connection, the driver sits in the ros::spin() function and operates primarily via the timer callback.

Can you describe more about your setup and how things were failing?

@mcamurri
Copy link

Hi @mikepurvis ,
I'm a colleague of @jbcolme
The issue is the following: after our PTU46 is connected to the serial port (but is the same with USB), it starts sending the following message: "independent (default) speed control mode"
This cause the node to crash, as it is always expecting a number followed by a star * character.

The crash is at line 54, where the driver tries to execute a lexical cast on the trimmed response from the PTU.

Also during the initialization phase, sometimes it fires some errors because there are strings in the PTU response rather than just a number and a star.

The issue should be easily solvable if the software catched the lexical cast and tried to manage the custom strings...but when I try just to ignore the exception somehow the previous pos values are not kept and I don't know how to handle this.

If you could make a hotfix it would be really appreciated.

@mcamurri
Copy link

Any update on the issue?

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

No branches or pull requests

3 participants