ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

rostopic pub message with UInt16 fields etc

asked 2014-11-08 21:51:46 -0500

Nap gravatar image

updated 2014-11-09 09:18:04 -0500

I have a message type as follows:

# LegoNXTROS_Status message
# Defines the protocol for publishing the NXT robot's status.
uint16 leftMotorEncoder
uint16 rightMotorEncoder
uint8 sonarSensor
bool leftTouchSensor
bool rightTouchSensor

When I use rostopic pub -1 /LegoNXTROS_Status nxt/LegoNXTROS_Status 1, 1, 120, false, false

roscore responds repeatedly with: [WARN] [WallTime: 1415504044.156096] Inbound TCP/IP connection failed: field leftMotorEncoder must be unsigned integer type and the message doesn't get through.

Can someone clarify what I'm doing wrong?

@ahendrix: Thanks. I will add that to my 'cheat' sheet.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-09 01:39:16 -0500

ahendrix gravatar image

I suspect rostopic pub is confused by the commas in your command. Maybe try without them?

rostopic pub -1 /LegoNXTROS_Status nxt/LegoNXTROS_Status 1 1 120 false false
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-11-08 21:51:46 -0500

Seen: 1,238 times

Last updated: Nov 09 '14