ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Added rostopic echo /rosout
message to the post.
In addition, I added my MCU debugging screen to check topic msg.
Can we solve the problem now?
2 | No.2 Revision |
Added rostopic echo /rosout
message to the post.
In addition, I added my MCU debugging screen to check topic msg.
Can we solve the problem now?
My MCU code, same as Arduino example
#include <ros.h>
#include <std_msgs/String.h>
#include "F28x_Project.h"
__interrupt void SCIB_RxIsr(void);
Uint32 BackTicker=0;
ros::NodeHandle nh;
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
char hello[13] = "hello world!";
void main(void)
{
nh.initNode();
nh.advertise(chatter);
while(1)
{
BackTicker++;
str_msg.data = hello;
chatter.publish( &str_msg );
nh.spinOnce();
DELAY_US(1000*100);
}
}
When not to use the delay function.
function: "<module>"
line: 86
topics: [/rosout]
---
header:
seq: 3
stamp:
secs: 1618364857
nsecs: 901356935
frame_id: ''
level: 2
name: "/serial_node"
msg: "Requesting topics..."
file: "SerialClient.py"
function: "SerialClient.requestTopics"
line: 404
topics: [/diagnostics, /rosout]
---header:
seq: 2
stamp:
secs: 1618364855
nsecs: 788872957
frame_id: ''
level: 2
name: "/serial_node"
msg: "Connecting to /dev/ttyUSB0 at 57600 baud"
file: "serial_node.py"
function: "<module>"
line: 86
topics: [/rosout]
---
header:
seq: 3
stamp:
secs: 1618364857
nsecs: 901356935
frame_id: ''
level: 2
name: "/serial_node"
msg: "Requesting topics..."
file: "SerialClient.py"
function: "SerialClient.requestTopics"
line: 404
topics: [/diagnostics, /rosout]
---
When using the delay function.
header:
seq: 6
stamp:
secs: 1618365337
nsecs: 803142070
frame_id: ''
level: 8
name: "/serial_node"
msg: "Lost sync with device, restarting..."
file: "SerialClient.py"
function: "SerialClient.run"
line: 461
topics: [/diagnostics, /rosout]
---
header:
seq: 7
stamp:
secs: 1618365337
nsecs: 809052944
frame_id: ''
level: 2
name: "/serial_node"
msg: "Requesting topics..."
file: "SerialClient.py"
function: "SerialClient.requestTopics"
line: 404
topics: [/diagnostics, /rosout]