Marty with python - walk backward

I'm working with the martypy library and it is working fine so far. The "walk forward" runs, e.g. robot.walk(8). But how can I give a "walk backward" command? It must accept a negative int8-value. The command robot.walk(-4) gives an error message: (... ubyte should be in range 0...255). In general: How can be given negative int8-values to the martypi functions?

Discussion

Leave a comment and join the discussion here


Please Log In or Sign Up to write a comment response

2 Responses

RudolfAtRTC OP

Hey Angus, many thanks, now it works. Greetings from Germany, Rudolf.

16:43:34, 06th October 2017   |   Permalink   |   View Source
angus STAFF

Hey there

You can make Marty walk backwards by giving a negative step length, like so:

marty.walk(2, step_length=-40)

You're seeing that error as the first argument to the walk method is the number of steps to take, which must always be a positive number

For reference the other options are here

16:06:32, 06th October 2017   |   Permalink   |   View Source