예제 #1
0
def send_poselist(rid, x, y, z):
    msg = pose_list_t()
    msg.timestamp = 0
    p = pose_t()
    msg.n = 1
    p.robotid = rid
    p.position = [x, y, z]
    p.orientation = [0, 0, 0, 10000]
    p.velocity = 0
    msg.poses = [p]

    lc.publish(output_channel, msg.encode())
예제 #2
0
                  help="pose timestamp")


(options, args) = parser.parse_args()
if len(args) != 4:
    print "mandatory arguments missing (",len(args),")"
    parser.print_help()
    exit(-1)


robotid = int(args[0])
x = float(args[1])
y = float(args[2])
z = float(args[3])
"""  --- no orientaion --- """

channel = options.channel
lc = lcm.LCM("udpm://239.255.76.67:7667?ttl=1") 


msg = pose_list_t()
p=pose_t()
p.robotid = robotid
p.position =  [x,y,z]
p.orientation = [0,0,0,0]
p.velocity=0
msg.poses = [p]
msg.n=1

lc.publish(options.channel, msg.encode())