Socket API problem

I'm experimenting with the socket API in a C# and in a C++ program. With the sensor information type requests some things are working fine, others not. - Battery voltage works, - Accelerometer works, - Motor current works. All functions with return type different from float32 wil give allways 0 as result. I have seen this with the "motor position" and also with the "motor enabled" commands. The zeros are present in the raw data from Marty.


Leave a comment and join the discussion here

Please Log In or Sign Up to write a comment response

3 Responses

sandy STAFF

Hi Rudolf,

Just been looking into this, and it seems like I might have made an error in the wifi module firmware. The chatter, motor position and motor enabled data are available over the websocket interface ( e.g. as used in the javascript module ), and are available through the ROS interface if you have a Raspberry Pi connected, but they don't seem to be exposed over the normal socket interface

Sorry about that - it's not a huge change to the ESP firmware but the difficulty is how we get that change over to you. If you ping me an e-mail at we'll get something sorted out


10:46:23, 22nd October 2017   |   Permalink   |   View Source
RudolfAtRTC OP

Hello Angus, sorry - your response don't help. Your link "here" goes to Python, but I'm working with C# and the socket API (TCP). My request e.g. is "010608" (hex notation). The answer shold be the position of the eyes servo as int8. This is allway 0! From the socket aPI documentation: Motor Position 0x06 [0x00, …, 0x08] Motors 0 through 8 int8

09:40:05, 22nd October 2017   |   Permalink   |   View Source
angus STAFF

I'm not too sure what the issue you're looking at is, exactly... I'd recommend perhaps trying the commands using MartyPy with a test connection type, which just prints a list of the bytes the library is sending to Marty - more info on how to do this here. We'll also have a quick review of our docs to make sure we haven't specified a type incorrectly

18:58:24, 21st October 2017   |   Permalink   |   View Source