10 return [float(val)
for val
in robot.state.value + additionalData]
14 if robot.name ==
"robot":
16 if robot.name ==
"robot_device":
20 robot.viewer.updateElementConfig(name, robot.stateFullSize())
22 for f
in robot.displayList:
27 """Increment then refresh."""
28 robot.incrementNoView(dt)
33 """Set robot config then refresh."""
34 robot.setNoView(*args)
43 * server='XML-RPC' == { 'XML-RPC' | 'CORBA' }
46 verbose = args.get(
"verbose",
True)
47 small = args.get(
"small",
False)
48 small_extra = args.get(
"small_extra", 10)
49 server = args.get(
"server",
"XML-RPC")
54 RobotClass = robot.__class__
58 print(
"using a small robot")
59 RobotClass.stateFullSize =
lambda x:
stateFullSize(x, small_extra * (0.0,))
61 RobotClass.stateFullSize = stateFullSize
63 robot.viewer = robotviewer.client(server)
65 RobotClass.refresh = refreshView
66 RobotClass.incrementNoView = RobotClass.increment
67 RobotClass.increment = incrementView
68 RobotClass.setNoView = RobotClass.set
69 RobotClass.set = setView
71 robot.displayList = []
74 if args.get(
"dorefresh",
True):
79 print(
"No robot viewer, sorry.")
94 self.
viewer.updateElementConfig(
"pong", [0, 0.9, self.
pos * 0.1, 0, 0, 0])
103 robot.viewer.updateElementConfig(
104 objname, [comsig.value[0], comsig.value[1], 0, 0, 0, 0]