How to detect which armor has been hit by infrared beam?
2801 6 2020-6-24
Uploading and Loding Picture ...(0/1)
o(^-^)o
yelzcammy
lvl.1
Hong Kong
Offline

It's great that the latest version of RM s1 supports to emit infrared beam. It make life easy for me and my sun to code custom-skills in bed room (to avoid clean beads and listen to the complaint of my wife ).
However the functions for "infrared beam" is not as rich as for "beads".
For example, I can detect which armor has been hit by beads but can not do the same thing on "infrared beam".
Currently, the sdk can only tells me that "the robot has been hit by infrared beam", seems not useful in most of cases.

Anyone has ideal about this? There ara any alternative solutions? or I just need to wait future-updates?

Best Regards,


2020-6-24
Use props
yelzcammy
lvl.1
Hong Kong
Offline

I finially found this thread, and I think it's very clear https://forum.dji.com/forum.php?mod=viewthread&tid=199781
.
The only IR sensors in the S1 are in the gimbal , so it may be impossible to get the accurate direction, as BGA said "the S1 most likely just uses the angle of incidence and  which sensor was triggered to figure out direction."
If it's true, hopefully,, DJI will release special API for it in future.
2020-6-25
Use props
BGA
Second Officer
United States
Offline

yelzcammy Posted at 6-25 19:29
I finially found this thread, and I think it's very clear https://forum.dji.com/forum.php?mod=viewthread&tid=199781
.
The only IR sensors in the S1 are in the gimbal , so it may be impossible to get the accurate direction, as BGA said "the S1 most likely just uses the angle of incidence and  which sensor was triggered to figure out direction."

DJI *MIGHT* release something like that, yes. But my confidence in DJI is lacking these days.
2020-6-26
Use props
BGA
Second Officer
United States
Offline

yelzcammy Posted at 6-25 19:29
I finially found this thread, and I think it's very clear https://forum.dji.com/forum.php?mod=viewthread&tid=199781
.
The only IR sensors in the S1 are in the gimbal , so it may be impossible to get the accurate direction, as BGA said "the S1 most likely just uses the angle of incidence and  which sensor was triggered to figure out direction."

Actually, there might be something you can do now:

When you add the IR detection block in Scratch and switch to python, you can see that it is using the following function to process hits:

ir_hit_detection_event

Looking at the source code, it looks like there are 2 other functions you could use (I did not test it):

ir_hit_detection_top_left
ir_hit_detection_top_right

These should be called when the left or right  sensors detect a hit so at least you have an idea of what side the hit came from. It might even be that this is all the RoboMaster does in the end and there is no attempt at figuring out the exact origin of the IR.
2020-6-26
Use props
BGA
Second Officer
United States
Offline

BGA Posted at 6-26 07:35
Actually, there might be something you can do now:

When you add the IR detection block in Scratch and switch to python, you can see that it is using the following function to process hits:

Another thing you can do is take a look at the msg parameter that those functions receive. It looks like they are just an array of bytes. byte 1 has the side that was hit but there might be more information there.

2020-6-26
Use props
yelzcammy
lvl.1
Hong Kong
Offline

BGA Posted at 6-26 07:56
Another thing you can do is take a look at the msg parameter that those functions receive. It looks like they are just an array of bytes. byte 1 has the side that was hit but there might be more information there.

Great suggestion! I'll try, thank you so much!
2020-6-26
Use props
djiuser_SmMavyJHXYc0
lvl.2
Flight distance : 661165 ft
Romania
Offline

I have a RoboMaster S1 which needs reset. Infrared Beam won't fire anymore. Does anyone know how to reset it?
2023-5-30
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules