The idea is to implement clients side applications that consume the actual web services. The client side could be
-Web Client : A navigator with Js framework like Extjs or Yui.
-Mobile App : ios application, android app.
-Desktop application ; JavaFX, Swing, c# ….
The main goals are :
-Configure poppy.
-Control Poppy.
-Ability to configure dynamixel motors directly (doing something equivalent to what the Dynamixel Wizard is doing)
The documentation of the new REST APIs can be found here :
Actually ZMQ is only one of the “transport” layer available for the REST API. The REST API itself is written using json. Those json data can then be exchanged using ZMQ or HTTP.
Hi guys, I started thinking about how the webapp will look like , could you please look at the link below and give me feedback the mock up can be found here : https://moqups.com/louzar/QeoO8rtn
Looking good! I’m really exited to play with something like this
Just a thought, maybe on the list of motor you could already see the main values, like the current position and if the motor is compliant or not. What do you say?
It really depends on the type of transport and connection you use. If you want to use HTTP over wifi this seems hard. If you use ZMQ over ethernet this shouldn’t be a problem at all.
I guess you can add to the REST API another method which basically calls all the other to retrieve all informations at once. This should do for what you want.
This is rather slow. How are your board and computer connected?
I added the REST method to get (and set) all registers and it works very well : 7 milliseconds for 2 motors with direct wifi (I installed an hot spot on my personal computer)
The reactivity is also very good (I have to measure the delay but it is very small)
For the moment, I tried only with 2 motors. Next step is the whole Poppy.
Here are the two global REST methods I added in rest.py :
# global rest methods
def get_all_register_values(self):
dict = {}
motorList = self.get_motors_list()
for motor in motorList:
dict[motor]={}
regList = self.get_motor_registers_list(motor)
if regList.count('registers')>0:
regList.remove('registers')
for reg in regList:
try:
dict[motor][reg] = self.get_motor_register_value(motor,reg)
except:
pass
return dict
def set_all_register_values(self,dict):
for motor in dict:
for reg in dict[motor]:
self.set_register_value(motor,reg,dict[motor][reg])
I did the first test with the whole 25 servo of Poppy and it is very low (I think the frequency is around 10Hz ). I am investigating to make a shorter json file (it is very redundant) and also on the wifi. The wifi is not the safer thing of the world…
After investigation, I reduced the json transmission length. It is again 5Hz…
I made a thread to get robot state and then send orders, it takes 13ms for all the motors. It is very good.
In fact, the 5Hz limitation is due to FIRE…
It is a good news since it is not a wifi problem . I just have to be a better programmer. easy.
Ok, I saw the “find” and “findItem” methods of Qt are very slow. There is always a way to get rid of these functions (hashtables, or taking the problem differently)
Now, I have a wifi connection of complete Poppy… at 50Hz !! tested with leap motion, there is no delay
For information and comparison, I did a ping test on my robot connect on wifi with an hotspot on my personnal computer :
Envoi d'une requête 'Ping' 192.168.137.121 avec 32 octets de données :
Réponse de 192.168.137.121 : octets=32 temps=37 ms TTL=64
Réponse de 192.168.137.121 : octets=32 temps=213 ms TTL=64
Réponse de 192.168.137.121 : octets=32 temps=199 ms TTL=64
Réponse de 192.168.137.121 : octets=32 temps=173 ms TTL=64
Id there a shortcut to launch a ZMQ server ? (something like an option in poppy-services ?)
other question: what value should be sent to change compliance ? I found that for HTTP you have to set True or False, but ZMQ only want strings and does nothing when I send “0” and crashed when I send “False”…