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

Vision Guided Robonova : Some Suggestion Required

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

Vision Guided Robonova : Some Suggestion Required

Post by cbhanukiran » Tue Aug 10, 2010 5:10 pm

Post by cbhanukiran
Tue Aug 10, 2010 5:10 pm

Hi.... Hello everyone......
This will be a bit long, so please spare some time. It will be of GREAT HELP to me. Your feedback will be of GREAT use to me.

I'm doing a similar project similar to

http://robosavvy.com/forum/viewtopic.php?p=9254#9254

and my idea is to make the RN explore an unknown environment ("walk" into a room autonomously and mark new objects, remember them with their positions, so that it can walk directly to the object later on). The Wireless Cam communicates with the laptop directly. So I wouldn't talk about it here.

Now I have some starting trouble, regarding which approach to take.

Option One: (without using roboBasic)
Donot use roboBasic at all. Here I treat the ATMEL chip as a bare minimum SSC microcontroller. Just send from laptop the motor commands, continously to RN. And try to read the sensor values from laptop, using serial port again. After processing, send a different set of motor commands to RN. Here to make the RN move continously, I should be continously feeding with motor commands and I should be reading the sensor values regularly.


Option Two: (using roboBasic)
Upload a big roboBasic routine which consists of (walk, turn left, turn right, walk back, getup_incaseof_fall etc) and RN will be having to two sensors Accelerometer (to determine falls, slippage) and Ultrasonic sensor (for measuring distance of obstacle) on two ports (say 5 and 6). Now I use Bluetooth to send the integer values of the sensor readings from RN to the laptop (where I process them) and send another value back to RN, which says what to do next. This is accomplished by using a switch case (kind of construct in roboBasic), whether it should walk forward/backward, turn left/right.

I don't know which approach is better. My lack of knowledge in Hardware is costing me dear (I'm from Computer Science background).

If I'm not clear somewhere I will explain it some more. But give me some feedback at the earliest.

Thank you so much for your time.

Bhanu Kiran C
Hi.... Hello everyone......
This will be a bit long, so please spare some time. It will be of GREAT HELP to me. Your feedback will be of GREAT use to me.

I'm doing a similar project similar to

http://robosavvy.com/forum/viewtopic.php?p=9254#9254

and my idea is to make the RN explore an unknown environment ("walk" into a room autonomously and mark new objects, remember them with their positions, so that it can walk directly to the object later on). The Wireless Cam communicates with the laptop directly. So I wouldn't talk about it here.

Now I have some starting trouble, regarding which approach to take.

Option One: (without using roboBasic)
Donot use roboBasic at all. Here I treat the ATMEL chip as a bare minimum SSC microcontroller. Just send from laptop the motor commands, continously to RN. And try to read the sensor values from laptop, using serial port again. After processing, send a different set of motor commands to RN. Here to make the RN move continously, I should be continously feeding with motor commands and I should be reading the sensor values regularly.


Option Two: (using roboBasic)
Upload a big roboBasic routine which consists of (walk, turn left, turn right, walk back, getup_incaseof_fall etc) and RN will be having to two sensors Accelerometer (to determine falls, slippage) and Ultrasonic sensor (for measuring distance of obstacle) on two ports (say 5 and 6). Now I use Bluetooth to send the integer values of the sensor readings from RN to the laptop (where I process them) and send another value back to RN, which says what to do next. This is accomplished by using a switch case (kind of construct in roboBasic), whether it should walk forward/backward, turn left/right.

I don't know which approach is better. My lack of knowledge in Hardware is costing me dear (I'm from Computer Science background).

If I'm not clear somewhere I will explain it some more. But give me some feedback at the earliest.

Thank you so much for your time.

Bhanu Kiran C
cbhanukiran
Robot Builder
Robot Builder
Posts: 23
Joined: Thu Feb 25, 2010 7:20 am

Post by JavaRN » Tue Aug 10, 2010 9:43 pm

Post by JavaRN
Tue Aug 10, 2010 9:43 pm

The link you've posted refer to my very first experiment with my robonova. Like you I have computer science background, no, or very little knowledge of hardware. Back then I used option 2 of what you are suggesting. Inside robonova was code for walking turning etc., and of course the camera the robot had was a wireless usb camera. The PC and the robot communicated through bluetooth - The robot sending sensor readings and the PC computer sending commands telling the robot what to do.

Hope this helps.


Charles
The link you've posted refer to my very first experiment with my robonova. Like you I have computer science background, no, or very little knowledge of hardware. Back then I used option 2 of what you are suggesting. Inside robonova was code for walking turning etc., and of course the camera the robot had was a wireless usb camera. The PC and the robot communicated through bluetooth - The robot sending sensor readings and the PC computer sending commands telling the robot what to do.

Hope this helps.


Charles
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

Re : Thanks a lot

Post by cbhanukiran » Wed Aug 11, 2010 7:22 am

Post by cbhanukiran
Wed Aug 11, 2010 7:22 am

Hi Charles,
Thank you so much for your reply. Now I can make a beginning to my work. I'll keep you posted with my progress in the project.

I just have one more doubt. I want to send just a integer from my PC to RN, specifying which step to take (turn, walk etc). This is done by reading the port to which Bluetooth module is connected :
in (port no).
But what if RN is executing some step (say walk) when data reaches the RN. How to transfer control from one subroutine to another subroutine in case of occurrence of an event (I'm referring to Event Driven Programming). The only way is left (what it seems to me) is to poll the port at regular intervals (before taking each step).

Sorry, if I was over-descriptive.

Thanks a lot for your time.

Bhanu Kiran C
Hi Charles,
Thank you so much for your reply. Now I can make a beginning to my work. I'll keep you posted with my progress in the project.

I just have one more doubt. I want to send just a integer from my PC to RN, specifying which step to take (turn, walk etc). This is done by reading the port to which Bluetooth module is connected :
in (port no).
But what if RN is executing some step (say walk) when data reaches the RN. How to transfer control from one subroutine to another subroutine in case of occurrence of an event (I'm referring to Event Driven Programming). The only way is left (what it seems to me) is to poll the port at regular intervals (before taking each step).

Sorry, if I was over-descriptive.

Thanks a lot for your time.

Bhanu Kiran C
cbhanukiran
Robot Builder
Robot Builder
Posts: 23
Joined: Thu Feb 25, 2010 7:20 am

Post by i-Bot » Wed Aug 11, 2010 9:48 am

Post by i-Bot
Wed Aug 11, 2010 9:48 am

I would agree that the second approach is best. The Robonova controller is not really a very good SSC and using it in this mode would add a lot of complexity.

I assume you will connect the bluetooth to the ETX/ERX for serial communication.

When synchronising the the PC program with the PC program, you need to consider the protocol between and understand the behavior of the Robobasic program. The Robonova controller runs two processes:
1) The single thread interpreter for Robobasic instructions
2) The interrupt driven thread which takes data presented in a move instruction, actions the move, and flags back to the interpreter thread when complete.

Because the of the single interpreter thread, you need to know where blocking occurs. There are two main sources of block in motions:
1) Implicit waits using the WAIT instruction, where the interpreter blocks waiting for the flag back from the move process.
2) When you use the MOVE instruction, it will wait for the move complete flag before actioning the next move.
This makes true event driven programming difficult.

While the interpreter thread is blocked it is not looking at the ERX port for received characters. There are a couple of characters of hardware buffer in the ERX UART.

At least to start I woud take the approach you suggest where send a request to the Robonova for a specific motion. Wait for a character from the Robonova to say it is complete and receive any sensor data. Decide what to do next based on sensor data and video. Then send the new motion. Motions might be small moves, like "turn 30 degrees", or "one step forwards", or more complex for longer walks.
At the Robonova end you execute the motion in a subroutine and after completion send the character to the PC and wait for the next motion. You may need to add a WAIT before sending the character to ensure the last motion is complete and the robot stable for the sensor readings.

Keep us updated.
I would agree that the second approach is best. The Robonova controller is not really a very good SSC and using it in this mode would add a lot of complexity.

I assume you will connect the bluetooth to the ETX/ERX for serial communication.

When synchronising the the PC program with the PC program, you need to consider the protocol between and understand the behavior of the Robobasic program. The Robonova controller runs two processes:
1) The single thread interpreter for Robobasic instructions
2) The interrupt driven thread which takes data presented in a move instruction, actions the move, and flags back to the interpreter thread when complete.

Because the of the single interpreter thread, you need to know where blocking occurs. There are two main sources of block in motions:
1) Implicit waits using the WAIT instruction, where the interpreter blocks waiting for the flag back from the move process.
2) When you use the MOVE instruction, it will wait for the move complete flag before actioning the next move.
This makes true event driven programming difficult.

While the interpreter thread is blocked it is not looking at the ERX port for received characters. There are a couple of characters of hardware buffer in the ERX UART.

At least to start I woud take the approach you suggest where send a request to the Robonova for a specific motion. Wait for a character from the Robonova to say it is complete and receive any sensor data. Decide what to do next based on sensor data and video. Then send the new motion. Motions might be small moves, like "turn 30 degrees", or "one step forwards", or more complex for longer walks.
At the Robonova end you execute the motion in a subroutine and after completion send the character to the PC and wait for the next motion. You may need to add a WAIT before sending the character to ensure the last motion is complete and the robot stable for the sensor readings.

Keep us updated.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am


4 postsPage 1 of 1
4 postsPage 1 of 1