Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can i order axes[] in Joy message ?

Question is how can i order axes of this msg. http://docs.ros.org/indigo/api/sensor_msgs/html/msg/Joy.html

if i write this code.

self.remoteMsg.header.stamp = rospy.Time.now()-self.time_start
            self.remoteMsg.buttons = {d[0],d[1],d[2],d[3],d[4],d[5]}
            print 'r1:', str(d[0])[:4] ,'r2:' , str(d[1])[:4] ,'r3:' , str(d[2])[:4] ,'r4:' , str(d[3])[:4] ,'r5:' , str(d[4])[:4] ,'r6:' , str(d[5])[:4]

It seem to correct order when it print out screen , but not when it on topic. Sorry for my bad english skill. Thank you advanced. :D