Hi, I’m new here and I’m trying to modify a robonova for autonomous navigation.
The first problem I have is that in the function MOVE for example G6A, variables can’t be used so I can’t make generic movements.
So I thought of using another language (C+, for example) , but how?
Please help!
You can use C or assembler, but this would be to replace the code on the RoboNova. The Robonova executes byte code downloaded from Robobasic, and the byte code for a MOVE does not allow variables to be used. Replacement of the code inside the RoboNova is complex, and requires a substancial library to perfom the servo functions.
There is an alternative. The SERVO command does support variables, though only on one servo at a time. Using the SERVO command will set the servo to move at the SPEED which is set. The SERVO command does not wait for the current MOVE to complete before starting the servo. So you can change after the MOVE. If you want to use ptp, use the SERVO command first, and leave that servo blank in the MOVE command, it will still be included in the ptp You may need to change the SPEED so the servo doesn’t move to fast before the MOVE sets the proper ptp speed. The SPEED parameter is only used when the MOVE or SERVO is initiated, so you can change back again after.
Thanks for the reply ribbotson, but I can’t get it to work. You say to put the move before or after the servo? Cause I’m putting the move after the servos and it doesn’t do anything.
Now its working ,thanks! But now there’s a new problem:
Do you know what are pin 15,16 and 17 of the B bloc (right arm)?
(I’m using variables, but I’ve written numbers so you can see what it does)
Because when I do this:
SPEED 1
SERVO 12,100
SERVO 13,100
SERVO 14,100
SPEED 8
MOVE G6B,100,10,10
The movements are syncronised but it doesn’t move smoothly, but if a do this ( I tried it more as joke!):
SPEED 1
SERVO 12,100
SERVO 13,100
SERVO 14,100
SPEED 8
MOVE G6B,100,10,10
MOVE G6B,10,100,10
It works perfectly! How come?
Seems strange.
Is the code you show correct ? Are there two moves in the second example ? Also servo 12 to 14 are in G6C.
Anyway this may help you to find the problem.
When the RN1 starts a group move it looks at all the current and desired positions of the servos in the PTP range. The PTP range is the group if PTP is set on, or all servos if PTP SET ALL is on.
The unused servos like 15 to 17 are not connected to anything, but will be included in the PTP calculation. The servos are initialised to position 100, but his may be changed by GETMOTORSET, or if any INIT values are stored.
When the PTP move is started the RN1 finds the servo where the difference from present to desired is greatest. It will move this servo at SPEED. All other servos will move at a slower speed in proportion to the distance they need to move.
This means the impact of putting values in unused servos depends on where they were previously set.
I hope you find the problem, else we can look in more detail.
It stopped doing strange things. Don’t really know why !
Anyway, I have another question. How do you get the consumption readings of the servos, cause I would like to be able to calculate the force in each servo?