Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Make RN stop a move he's performing

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
8 postsPage 1 of 1
8 postsPage 1 of 1

Make RN stop a move he's performing

Post by RDanielOlivav » Tue Jul 24, 2007 8:15 pm

Post by RDanielOlivav
Tue Jul 24, 2007 8:15 pm

Hi!


Does someone know hoe to cancel or stop a move of a RN, once it's started?

Thanks in advance
Hi!


Does someone know hoe to cancel or stop a move of a RN, once it's started?

Thanks in advance
RDanielOlivav
Newbie
Newbie
Posts: 6
Joined: Thu Jun 28, 2007 2:42 pm

Post by RedFoxDude » Tue Jul 24, 2007 8:22 pm

Post by RedFoxDude
Tue Jul 24, 2007 8:22 pm

I suppose you could program it to check if one of the buttons is pressed in between positions.

It could be like:
If button pressed> Then GOTO stop motion (stop motion would be a motion that brings the RN to the home position.)
Else
the next position.

RedFoxDude
Sorry I didn't make it in Robobasic, I don't remember all of the commands :oops: .
I suppose you could program it to check if one of the buttons is pressed in between positions.

It could be like:
If button pressed> Then GOTO stop motion (stop motion would be a motion that brings the RN to the home position.)
Else
the next position.

RedFoxDude
Sorry I didn't make it in Robobasic, I don't remember all of the commands :oops: .
Last edited by RedFoxDude on Tue Jul 24, 2007 11:43 pm, edited 1 time in total.
Image
RedFoxDude
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 58
Joined: Mon Jul 24, 2006 1:00 am
Location: Oakland, CA

Post by DirtyRoboto » Tue Jul 24, 2007 11:17 pm

Post by DirtyRoboto
Tue Jul 24, 2007 11:17 pm

The RN requires that you program it to do things. The BASIC TEMPLATE is just that. A set of factory moves that only do what they do.

If you want to do anything else with your RN then you have to program it to do these things.

If you want to interupt a move then you need to program this into the code. So like RedFoxDude says, do a check for the remote and make a decision based on the input.

Marcus.
The RN requires that you program it to do things. The BASIC TEMPLATE is just that. A set of factory moves that only do what they do.

If you want to do anything else with your RN then you have to program it to do these things.

If you want to interupt a move then you need to program this into the code. So like RedFoxDude says, do a check for the remote and make a decision based on the input.

Marcus.
In servo's we trust!
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by RDanielOlivav » Wed Jul 25, 2007 11:59 am

Post by RDanielOlivav
Wed Jul 25, 2007 11:59 am

May be I didn't express correctly. I'd like to make a FEEDBACK of the sensor data. My problem is that I can't use sensor data if I can't stop the movements I'm doing so that it adapts to the world around him.

So for example if I'm moving a leg and I detect an obstacle, I want to be able to change the movement I'm doing by a different one, without having to end the first movement.

I'm able to use variables in the movements and place every part of the robots body where I want. I have also all the sensors needed, my only problem is that I can't stop a movement once it starts.

This way the robot will be able to adapt his movements.

Thanks in advance.
May be I didn't express correctly. I'd like to make a FEEDBACK of the sensor data. My problem is that I can't use sensor data if I can't stop the movements I'm doing so that it adapts to the world around him.

So for example if I'm moving a leg and I detect an obstacle, I want to be able to change the movement I'm doing by a different one, without having to end the first movement.

I'm able to use variables in the movements and place every part of the robots body where I want. I have also all the sensors needed, my only problem is that I can't stop a movement once it starts.

This way the robot will be able to adapt his movements.

Thanks in advance.
RDanielOlivav
Newbie
Newbie
Posts: 6
Joined: Thu Jun 28, 2007 2:42 pm

Interrupting moves

Post by JavaRN » Wed Jul 25, 2007 12:30 pm

Post by JavaRN
Wed Jul 25, 2007 12:30 pm

If that is what you want to do you have to add the code that reads the sensor feedback in the subroutine for the move (may be before the motor group command) and then take the appropriate action.
If that is what you want to do you have to add the code that reads the sensor feedback in the subroutine for the move (may be before the motor group command) and then take the appropriate action.
F'dan il-passatemp ghandek bzonn zewg affarijiet - FLUS u HIN. Zewg affarijiet li huma skarsi hafna u li jien minnhom ghandi vera ftit!
JavaRN
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 282
Joined: Fri Mar 02, 2007 11:01 pm

Post by i-Bot » Wed Jul 25, 2007 12:50 pm

Post by i-Bot
Wed Jul 25, 2007 12:50 pm

Once an individual move command is started, then the controller does not allow another move until that one is complete. There is an implicit WAIT before a MOVE command. Other commands should still work.

You might try the GETMOTORSET command. this will read the current position, and should terminate the move at that position. Haven't tried it though.

SERVO should still work, but rather cumbersome.
Once an individual move command is started, then the controller does not allow another move until that one is complete. There is an implicit WAIT before a MOVE command. Other commands should still work.

You might try the GETMOTORSET command. this will read the current position, and should terminate the move at that position. Haven't tried it though.

SERVO should still work, but rather cumbersome.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by RDanielOlivav » Wed Jul 25, 2007 5:09 pm

Post by RDanielOlivav
Wed Jul 25, 2007 5:09 pm

You're a genius! Thanks, it worked. It makes a strange movement when it stops, but no problem.

By the way, you wouldn't know how to make a serial COM faster. Cause I've tried using 115200 in stead of 9600 but it doesn't make any difference. And I thought of not using a handshake after every time I read but then he just can't get the data.

read serial:
retry_rcv: ERX 9600,rcv_data,retry_rcv
ETX 9600,48 'handshake

Have you any idea?
Thanks in advance.
You're a genius! Thanks, it worked. It makes a strange movement when it stops, but no problem.

By the way, you wouldn't know how to make a serial COM faster. Cause I've tried using 115200 in stead of 9600 but it doesn't make any difference. And I thought of not using a handshake after every time I read but then he just can't get the data.

read serial:
retry_rcv: ERX 9600,rcv_data,retry_rcv
ETX 9600,48 'handshake

Have you any idea?
Thanks in advance.
RDanielOlivav
Newbie
Newbie
Posts: 6
Joined: Thu Jun 28, 2007 2:42 pm

Post by i-Bot » Wed Jul 25, 2007 8:42 pm

Post by i-Bot
Wed Jul 25, 2007 8:42 pm

I think the strange motion is due to the reading of the position, which does turn the servo into "limp" mode for a short period.

As an alternative you might try:
poke 1251,255
poke 1252,255
poke 1253,255

During a move this might enable to then do another move immediately without a wait. Again I have not had chance to test this. Use the 3 instructions as the stop, then make a new move straight after.

For the serial port speed, less help ! The controller spends most of its time in the interrupt routines for the motion. about 75% !. When it is not there, it is interpreting byte code from EEPROM and executing. The robobasic instruction time is in the milliseconds. This is why the speed probably makes little difference.
I think the strange motion is due to the reading of the position, which does turn the servo into "limp" mode for a short period.

As an alternative you might try:
poke 1251,255
poke 1252,255
poke 1253,255

During a move this might enable to then do another move immediately without a wait. Again I have not had chance to test this. Use the 3 instructions as the stop, then make a new move straight after.

For the serial port speed, less help ! The controller spends most of its time in the interrupt routines for the motion. about 75% !. When it is not there, it is interpreting byte code from EEPROM and executing. The robobasic instruction time is in the milliseconds. This is why the speed probably makes little difference.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am


8 postsPage 1 of 1
8 postsPage 1 of 1