Always missing the first message #51
Unanswered
StephenChou0119
asked this question in
Q&A
Replies: 1 comment
-
Hello, the problem here is that the subscriber connects to the publisher after the publisher has already sent its first message; to send this first message to the subscriber, regardless of the timing of the connection, use the pub, err := goroslib.NewPublisher(goroslib.PublisherConf{
Node: n,
Topic: "test_topic",
Msg: &sensor_msgs.Imu{},
Latch: true,
})
if err != nil {
panic(err)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
background
problem description
always missing th first message
pub:
Outgoing: &{Package:0 Header:{Package:0 Seq:0 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Outgoing: &{Package:0 Header:{Package:0 Seq:1 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Outgoing: &{Package:0 Header:{Package:0 Seq:2 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Outgoing: &{Package:0 Header:{Package:0 Seq:3 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Outgoing: &{Package:0 Header:{Package:0 Seq:4 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Outgoing: &{Package:0 Header:{Package:0 Seq:5 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
sub:
Incoming: &{Package:0 Header:{Package:0 Seq:1 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Incoming: &{Package:0 Header:{Package:0 Seq:2 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Incoming: &{Package:0 Header:{Package:0 Seq:3 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Incoming: &{Package:0 Header:{Package:0 Seq:4 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Incoming: &{Package:0 Header:{Package:0 Seq:5 Stamp:0001-01-01 00:00:00 +0000 UTC FrameId:} Orientation:{Package:0 X:0 Y:0 Z:0 W:0} OrientationCovariance:[0 0 0 0 0 0 0 0 0] AngularVelocity:{Package:0 X:23.5 Y:22.1 Z:-7.5} AngularVelocityCovariance:[0 0 0 0 0 0 0 0 0] LinearAcceleration:{Package:0 X:0 Y:0 Z:0} LinearAccelerationCovariance:[0 0 0 0 0 0 0 0 0]}
Beta Was this translation helpful? Give feedback.
All reactions