[Rock-dev] REST interface not working ?

Steffen Planthaber Steffen.Planthaber at dfki.de
Wed Aug 19 16:23:11 CEST 2015


Hi,

Could be the parser has trouble with the e notation.

Please try:

# curl -X POST -H "Content-Type: application/json" -d
 > '{"value":{"translation":0,"rotation":0}}'
 > 
http://192.168.10.10:9292/api/tasks/tasks/localhost/skid4_control/ports/motion_command/write




Am 19.08.2015 um 15:31 schrieb Martin Schroeer:
> Hi there.
>
> I'm trying to use the REST interface of an ASGUARD to have it moving around.
> Querying the interface for a input sample
>
>       # curl
> http:/192.168.10.10:9292/api/tasks/tasks/localhost/skid4_control/ports/motion_command/sample
>
> gives me
>
>       {"value":{"translation":5.3281e-316,"rotation":6.934147e-310}}
>
> But if I try to write this very sample like
>
>       # curl -X POST -H "Content-Type: application/json" -d
> '{"value":{"translation":5.3281e-316,"rotation":6.934147e-310}}'
> http://192.168.10.10:9292/api/tasks/tasks/localhost/skid4_control/ports/motion_command/write
>
> it just gives me
>
>       {"error":"malformed JSON string: #<Hashie::Mash
> rotation=6.934147e-310 translation=5.3281e-316>"}
>
> What am I doing wrong here ?
>
>
> Regards,
> Martin
>


-- 
  Steffen Planthaber
  Weltraumrobotik

  Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany

  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4125
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   Steffen.Planthaber at dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



More information about the Rock-dev mailing list