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

If I post a message, the ESP32 will crash #623

Open
wandao00 opened this issue Nov 6, 2023 · 1 comment
Open

If I post a message, the ESP32 will crash #623

wandao00 opened this issue Nov 6, 2023 · 1 comment

Comments

@wandao00
Copy link

wandao00 commented Nov 6, 2023

Hello, I recently had a problem where when I post my message my esp32 crashes (arduino) and when I remove the publish message code the problem is solved.
pub.publish(&laser_msg);(this is code)
image(This is the phenomenon of rushing)

[INFO] [1699236329.312304]: ROS Serial Python Node
[INFO] [1699236329.319116]: Fork_server is: False
[INFO] [1699236329.321276]: Waiting for socket connections on port 11411
[INFO] [1699236329.322986]: Waiting for socket connection
[INFO] [1699236329.344440]: Established a socket connection from 192.168.148.113 on port 53141
[INFO] [1699236329.346280]: calling startSerialClient
[INFO] [1699236331.452127]: Requesting topics...
[INFO] [1699236331.602897]: Note: publish buffer size is 2048 bytes
[INFO] [1699236331.604556]: Setup publisher on laser_scan [sensor_msgs/LaserScan]
[ERROR] [1699236346.579466]: Lost sync with device, restarting...
[INFO] [1699236346.581656]: Requesting topics...
[WARN] [1699236346.628828]: Last read step: data checksum
[WARN] [1699236346.630709]: Run loop error: [Errno 104] Connection reset by peer
[INFO] [1699236346.632325]: Client has exited, closing socket.
[INFO] [1699236346.633669]: Shutting down
[INFO] [1699236346.635329]: All done
Traceback (most recent call last):
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 475, in run
if self.port.inWaiting() < 1:
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 312, in inWaiting
chunk = self.socket.recv(1, socket.MSG_DONTWAIT|socket.MSG_PEEK)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/wandao/catkin_ws/devel/lib/rosserial_python/serial_node.py", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 80, in
server.listen()
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 255, in listen
self.startSerialClient()
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 261, in startSerialClient
client.run()
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 555, in run
self.port.flushOutput()
AttributeError: 'RosSerialServer' object has no attribute 'flushOutput'
[INFO] [1699236346.642929]: Sending tx stop request
[INFO] [1699236346.644427]: shutdown hook activated
Exception in thread Thread-6:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 788, in processWriteQueue
self._write(data)
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 749, in _write
self.port.write(data)
File "/home/wandao/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 294, in write
totalsent += self.socket.send(data[totalsent:])
OSError: [Errno 9] Bad file descriptor
(Here's a ros tip)
Forgive my English,thanks(谢谢)!

@wandao00 wandao00 changed the title If I post a message, the ESP32 will run If I post a message, the ESP32 will crash Nov 6, 2023
@wandao00
Copy link
Author

wandao00 commented Nov 6, 2023

I've also noticed that when I set up rangs and intensities, the same crashes
laser_msg.ranges_length = 10; laser_msg.intensities_length = 10;

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

1 participant