Newbee questions and suggestion

I’m all new to the ssc32 and i am just starting my hexapod project. I have two questions and a suggestion (that might have been discussed before).

Questions:

  1. Is it possible to send multiple move commands to the ssc-32 that are not synchronized? What i would like to do is for example send commands to move the legs to next “frame” and then send “move head to a position” while the legs are moving.

  2. What is the used strategy to get a smooth gate. Do you send a group move command and then query the movement status repeatedly until the move is completed, or do you send a new group move command when the time for the last move is out?

Suggestion:

  • Would it be possible to use one of the binary outputs to indicate when a move is done. This way i could use an interrupt on my host to immediately know when to trigger next command without polling. Alternatively the ssc-32 could send a “done” command over the serial port. This would be great if you actually can have multiple moves going on at the same time. (as asked in question 1)

Regards from a cold and snowy Stockholm, Sweden

No this is not possible. The SSC-32 can only do one movement for a group of servos at a time.

The first attempt to use the Query to sync a walking gait was in the Phoenix code. It worked, but there is a delay that can be noticeable, so the norm nowadays is to wait the predefined amount of time and then send the next command. This is what the Phoenix code uses now.

Borrowing an output to flag movement could be done. I will bring it to the attention of Mike. He is not able to work on the SSC-32 firmware at the moment, but hopefully soon. The “done” command already exists. It’s the Query command. But I can tell you there is no way the SSC-32 will ever be able to store multiple moves in the fashion you are describing.

I can understand the limitation to one move at a time. But you must agree that it would be cool :slight_smile: I guess i could an alternative to the SSC-32 for auxiliary functions that need to be performed while walking. On the other hand it could work by just synchronizing the movement of for example a sensor turret with the walking sequence.

The “done” command i am asking for is initiated from the SSC-32. When the move is done it would send a command. This way i only need to look for a byte in my serial input buffer rather than send a command and then wait for a reply. This put less strain on the host cpu and probably save some time to.

/Magnus

Just to clarify, the SSC-32 can do multiple group moves at any time, as long as they do not use the same servos. So walking and a turret could easily be controlled at the same time. The functionality you described could be cool, but it adds complexity. You have to be able to handle the que, be able to append, or remove, or at minimum cancel the stored moves. Most users want real time IK which is not possible when storing moves in a que.

Ah, I appreciate the clarification.

Ok,
Thanks for the quick reply! Just to make clear i understand:

Can i tell servo 1, 2 and 3 to move to a position at a slow speed, and while they are moving tell servo 4 and 5 to do something?

If this is the case, when will the query command reply that movement is completed?

I’m sorry if this is a basic question, but i’m trying to figure out the architecture of my control software.

/Magnus

In your example the Query would only work for the last commanded group move. If you move servos 1,2,3 and while it’s moving you command servos 4,5 the Query looks at the “previous” commanded move which would be 4,5 only. The Query command is pretty limited.

OK, thank’s! I guess i will have to implement some kind of time keeping in my app. store the start time and duration och all started commands and then get a signal when it’s time to send next.

/Magnus

Can you tolerate any extra hardware? I’m thinking an external timer that can be set to the calculated move time could give you an interrupt or a flag to poll. Or if a background timer on the processor you’re using (might have to be done in ASM) can be set up to give you an interrupt/flag.

Might ask on Basic Micro forum about setting up the background timer on the 'Pro. Kurt or AcidTech might also be able to answer that question.

Getting the SSC-32 to set a bit for you would work, but as has been said, only the last move group gets reported on currently (Q); so it might be difficult to do what you want. Unless, of course, you used multiple SSC-32 boards…

Alan KM6VV

Well I’m not even sure i need to make it this complicated. I think i will use one or two arduinos for control. Maybe one for low level stuff like IK and servo sequencing and one for “behavior”. I don’t think I will need any external timers.

I think it could be implemented as some kind of queue where a timer is loaded with the time to next event. When adding an event in the queue make sure it is placed in the right “time order” and calculate how long after the event before it should trigger.

Something like that…

/Magnus

Actually not that complicated. Adding the times in sorted order in a queue will work. It’s basically what is done to determine the time for the next step pulse to be generated in the CNC controllers (hobby) I’ve worked with. But you’d still need an interrupt function to “watch” the queue… Unless your code has nothing else to do but spin on the next time in the queue. Which could be the case, if you have an “extra” uP. (basically external hardware to the main process)

Alan KM6VV