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

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?
Cheers,
Nap

@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
1

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

Question Tools

1 follower

Stats

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

Seen: 1,431 times

Last updated: Nov 09 '14