Line Following Example in Programming Guide
9524 10 2019-10-21
Uploading and Loding Picture ...(0/1)
o(^-^)o
rhoude57 - YUL
lvl.4
Canada
Offline

Hello,

Has anyone tried running the following example taken from the RoboMaster S1 Programming Guide for the Smart blocks, para. 5. set line identification color to (blue)

I tried running it and rather than following the blue line, it just drifts off to the right until it runs into something.

I'm puzzled...

Line following Example

Line following Example
2019-10-21
Use props
BGA
Second Officer
United States
Offline

This programs uses a slightly different method to track the line as the bigger one in "6. set exposure value to high". A few things to try based on the other example:
- Set exposure to low.
- Set down angle to 20.
- Check if numbers of items in LineList is 42 before trying to do anything with it.
- Play with the Ki, Kp, Kd parameters.
2019-10-23
Use props
BGA
Second Officer
United States
Offline

Also, just to test, you can remove the set chassis translation speed line and manually move the robot around. The gimbal should move to track the line. If it does not, that might be the problem.
2019-10-23
Use props
rhoude57 - YUL
lvl.4
Canada
Offline

BGA Posted at 10-23 09:16
Also, just to test, you can remove the set chassis translation speed line and manually move the robot around. The gimbal should move to track the line. If it does not, that might be the problem.

An issue I am stumbling into is that input and output parameters are verly poorly described.

For example, what are the Units and Min and Max values for the X and Y Coordinates and Actual Tangent.

Another example, I feel, of a rushed product launch.

I hope we will soon be on the receiving end of one big update of code and documentation.
2019-10-23
Use props
BGA
Second Officer
United States
Offline

rhoude57 - YUL Posted at 10-23 22:06
An issue I am stumbling into is that input and output parameters are verly poorly described.

For example, what are the Units and Min and Max values for the X and Y Coordinates and Actual Tangent.

X and Y everywhere are always in the interval [0, 1].

Tangent has no interval because it is asymptotic. It is undefined at right angles (90, 270 ...). Also, there is no unit.


2019-10-24
Use props
BGA
Second Officer
United States
Offline

BGA Posted at 10-24 08:24
X and Y everywhere are always in the interval [0, 1].

Tangent has no interval because it is asymptotic. It is undefined at right angles (90, 270 ...). Also, there is no unit.

In any case, in your example you are only looking at the X coordinate, which makes sense as you want to follow the line to left.right. But maybe you should be looking at a point farther away instead of the first point (which is what you are doing).
2019-10-24
Use props
rhoude57 - YUL
lvl.4
Canada
Offline

BGA Posted at 10-24 08:27
In any case, in your example you are only looking at the X coordinate, which makes sense as you want to follow the line to left.right. But maybe you should be looking at a point farther away instead of the first point (which is what you are doing).

A BIG Thank You to all that are contributing to this thread...

All your comments hit the mark and I am discovering the same issues and finding very similar solutions.

I hope the DJI Support team is tracking and wil be forwarding this thread to the Technical Writers for the Programming Guide. I will post my final solutions with a video as soon as I get the program running to my liking.

Keep your ideas and comments coming...

2019-10-24
Use props
loko
lvl.1
United States
Offline

rhoude57 - YUL Posted at 2019-10-24 13:29
A BIG Thank You to all that are contributing to this thread...

All your comments hit the mark and I am discovering the same issues and finding very similar solutions.

This is a really informative thread. Thanks for everyone's input. I'm still wondering though, what are the units for each of the parameters? What is the scale of the X-Y coordinate system? I assume tangent is measured in +/- degrees. How is curvature measured, though? As a percentage? Thanks for any help figuring this out.
2020-3-12
Use props
gpvillamil
lvl.4
Flight distance : 210226 ft
United States
Offline

BGA Posted at 2019-10-24 08:27
In any case, in your example you are only looking at the X coordinate, which makes sense as you want to follow the line to left.right. But maybe you should be looking at a point farther away instead of the first point (which is what you are doing).

I had good results looking at points further away depending on speed, ie. faster movement look at a further away point.
2020-3-12
Use props
Tobor
lvl.1
Canada
Offline

Hello. I wonder if someone can help me out? I did the above example, but I keep getting an index out of range error. I would love the code in Python if anyone has it. I really need help on solving my line follow problem. Thanks.
2021-7-11
Use props
Tobor
lvl.1
Canada
Offline

I'm new here as of today. Anyway, I had Robomaster for a little over a year now. I did everything with it, but the Line Follower program example will not work for me at all. How can I make the robot solve this problem. The program example is very very vague.
2021-7-11
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules