record a sequence

15 years 6 months ago #4031350 by arkleyjoe
record a sequence was created by arkleyjoe
Hi,

I wonder if anyone can help, I am wondering if it is possible to record a path / sequence for my robot using an RC controller and then by connecting a PC have the PC play back the commands in order to automate the sequence?


Please Log in or Create an account to join the conversation.

15 years 6 months ago #4032703 by cosma
Replied by cosma on topic Re:record a sequence

This is an interesting idea that should not be too hard to do.
To record the sequence, you could use a laptop on your robot on which you would run the supplied Roborun utility. The data logging function will allow you to store up to 30 minutes of operation into a text file.

You will need to modify the cable to add an RS232 tap as shown in the users manual.

The controller outputs all its operating parameter (including RC channel values) approximately 4 times per second.

You would need to write a short program that takes the data in this file, and sequences it out to the controller.

Beware that since you will get an update only 4 times per second, you will not be able to record abrupt changes and you would need to operate the robot rather slowly.

Beware also that some of the conditions may change when playing back (batterly charge, for example). So even though, you will be sending commands at pretty much the same time intervales as during the recording run, the robot may end up not doing the same exact track.


Please Log in or Create an account to join the conversation.

15 years 6 months ago #4046880 by arkleyjoe
Replied by arkleyjoe on topic Re:record a sequence

I guess to increase accuracy i could have sensors to check distance traveled etc etc. Or would it be more simple, given that these sensors would be in place to just pre set the desired path.

Please Log in or Create an account to join the conversation.

15 years 2 months ago #5631471 by filmcraft
Replied by filmcraft on topic Re:record a sequence
Did this ever work for you? I'm trying to do the exact same thing?

Please Log in or Create an account to join the conversation.

15 years 2 months ago #5678667 by cosma
Replied by cosma on topic Re:record a sequence
<P style="MARGIN: 0px">For best accuracy, the distance information picked up by the encoder should be used.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">However, the proposed technique earlier in this thread, does not allow to log the encoder information.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">One way to get close to what you need is to operate the motors in closed loop speed mode. In this way, when you have captured that a motor has moved x seconds at y speed, playing back will result is similar travelled distance even if the load or battery voltage is not the same.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">For best results you should find a way to capture the encoder information and use this for playback. This will require that you operate the controller with a microcomputer where you can write custom software.
<P style="MARGIN: 0px">

Please Log in or Create an account to join the conversation.

15 years 2 months ago #5681071 by filmcraft
Replied by filmcraft on topic Re:record a sequence
Lets say theoreticly that I am using the two motors on the controller operated by RC. Does the RS-232 on the controller send the signal to that port as to the motion being submitted?

Could then this not be captured using some device to record the motion data?

Please Log in or Create an account to join the conversation.

15 years 2 months ago #5685758 by cosma
Replied by cosma on topic Re:record a sequence
<P style="MARGIN: 0px">The manual shows you how to capture various controller's parameters on the serial port while in RC mode.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">One of these parameters is the applied speed command received from the RC radio. Using the roborun utility, (on a laptop inside the robot, for example), you can capture and save these values in an excel spreadsheet. The capture rate is a capture four times per second. Beware therfore that if you were hopping to capture rapid speed variations, this would not work well.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">To play back, however, you will need to write a program on a PC or embedded computer that would read the captured values and play them back, formatted as RS232 speed commands, at the same rate as they were captured.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.089 seconds