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

Revision history [back]

click to hide/show revision 1
initial version

Thanks for your input. I've tried running nh.now() only after nh.initNode(), and I've added Serial.begin(57600) to setup().

I get the same set of error messages. I tried running rostopic echo /rosout to see what's published and it looks like something goes seriously wrong. Are you able to see what causes this?

$ rostopic echo /rosout
header: 
  seq: 8
  stamp: 
    secs: 1616519114
    nsecs:  97291946
  frame_id: ''
level: 2
name: "/serial_node"
msg: "Requesting topics..."
file: "SerialClient.py"
function: "SerialClient.requestTopics"
line: 403
topics: [/diagnostics, /rosout]
---
header: 
  seq: 9
  stamp: 
    secs: 1616519119
    nsecs: 213711977
  frame_id: ''
level: 4
name: "/serial_node"
msg: "Last read step: message length"
file: "SerialClient.py"
function: "SerialClient.run"
line: 543
topics: [/diagnostics, /rosout]
---
header: 
  seq: 10
  stamp: 
    secs: 1616519119
    nsecs: 219691038
  frame_id: ''
level: 4
name: "/serial_node"
msg: "Run loop error: Serial Port read failure: Returned short (expected 3 bytes, received\
  \ 2 instead)."
file: "SerialClient.py"
function: "SerialClient.run"
line: 544
topics: [/diagnostics, /rosout]
---
header: 
  seq: 11
  stamp: 
    secs: 1616519119
    nsecs: 225771903
  frame_id: ''
level: 2
name: "/serial_node"
msg: "Requesting topics..."
file: "SerialClient.py"
function: "SerialClient.requestTopics"
line: 403
topics: [/diagnostics, /rosout]
---