Motion example fails with: ISerialization error Status Read Past End
lugu opened this issue · 2 comments
lugu commented
when running the motion example, it fails with the error:
panic: call moveTo failed: ISerialization error Status Read Past End
This is likely due to a wrong resolution of the action ID since the ALMotion service have several "moveTo" methods taking various arguments. If this is confirmed, action resolution needs to be improved by checking the signature as well as the method name.
lugu commented
diagnostic confirmed:
> github.com/lugu/qiloop/bus.(*client).Call() /home/ludo/go/src/github.com/lugu/qiloop/bus/client.go:57 (PC: 0x970c58)
Frame 0: /home/ludo/go/src/github.com/lugu/qiloop/bus/client.go:57 (PC: 970c58)
52: }
53:
54: msg := c.newMessage(serviceID, objectID, actionID, payload)
55: messageID := msg.Header.ID
56:
=> 57: reply := make(chan *net.Message)
58:
59: filter := func(hdr *net.Header) (matched bool, keep bool) {
60: if hdr.Service == serviceID && hdr.Object == objectID &&
61: hdr.Action == actionID && hdr.ID == messageID {
62: return true, false
(dlv) p actionID
149
(dlv) frame 5
> github.com/lugu/qiloop/bus.(*client).Call() /home/ludo/go/src/github.com/lugu/qiloop/bus/client.go:57 (PC: 0x970c58)
Frame 5: ./main.go:29 (PC: 995050)
24: if err != nil {
25: panic(err)
26: }
27:
28: // Remote procedure call: call the method "move to" of the service.
=> 29: err = motion.MoveTo(0.2, 0, 0)
30: if err != nil {
31: panic(err)
32: }
33:
34: // Demonstrate cancellation: create a context which expires in
(dlv) p motion.ObjectProxy.proxy.meta.Methods[149]
github.com/lugu/qiloop/type/object.MetaMethod {
Uid: 149,
ReturnSignature: "b",
Name: "moveTo",
ParametersSignature: "(m)",
Description: "Makes the robot move to the given relative positions. This is a ...+14 more",
Parameters: []github.com/lugu/qiloop/type/object.MetaMethodParameter len: 1, cap: 1, [
(*"github.com/lugu/qiloop/type/object.MetaMethodParameter")(0xc00000e1c0),
],
ReturnDescription: "true if the moveTo finished successfully",}
(dlv)