-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LD06 Proximity Sensor Integration #20138
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! thanks for this contribution it is a good start especailly if you are new to C++!
Have you tested this yet?
Looks like it is failing to compile on Durandal. Do you have your development environment setup to compile it?
You will need to add the new driver to the enum here
CYGBOT_D1 = 13, |
You need to call the detect()
method as as it stands right now the compiler may not be pulling in any of this code.
Add the call to detect around here in AP_Proximity.cpp
:
Add to the Param Description here:
// @Values: 0:None,7:LightwareSF40c,2:MAVLink,3:TeraRangerTower,4:RangeFinder,5:RPLidarA2,6:TeraRangerTowerEvo,8:LightwareSF45B,10:SITL,12:AirSimSITL,13:CygbotD1 |
We should also add #if AP_PROXIMITY_LD06_ENABLED
so users can decide to compile it in or not.
You aren't checking the CRC packets?
There is more here to do .... but these are starts especially the compiling bit.
Closes #17211
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more review but I didn't get to the CPP yet so bug me again about it. Maybe after you've done some testing on your end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of stylistic nitpicks.
And some small cleanups but I don't see any glaring reason why you get the difference in output in your GCS_Send_TEXT vs MissionPLanner's GUI tool.
I've pushed two commits onto this PR to no longer use the table based approach for the CRC. You still will need to squash up and fix your commits. But I think you are nearly there given your testing. Added a rebase too. |
440349e
to
07c06c8
Compare
Completed testing the LiDAR with a Pixhawk 4 controller. Videos below demonstrate the LiDAR working with Mission Planner's Proximity Sensor feature: |
07c06c8
to
7cd71e9
Compare
Cleaned up the commit list and fixed a few style items. Once you retest it with changes to the crc_function we can remove the commented out code and squash things again. |
2ea4995
to
a9c1c04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @Adithya-Patil! Overall looks great. One thing that I can't immediately find in the driver is the use of PRX_YAW_CORR to correct for devices that are not connected facing forward?
An easy way to test would be to change PRX_ORIENT and PRX_YAW_CORR and see if they reflect correctly in your driver? I think we have missed this in some of our earlier drivers and needs to be addressed for them as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with LD06.
Once the log started, it stopped working.
I think this change will solve the problem.
daa81a1
to
2dd15dd
Compare
fixed up the commits by doing a soft reset and then did a That should get this passing autotests that were failing |
@rishabsingh3003 When can you check the logs? |
Not a blocker but we should add an entry to the custom build server for this new proximity sensor |
rebase |
85b01ce
to
a04f2db
Compare
a04f2db
to
668bdbd
Compare
@rishabsingh3003 I've given you maintainer status so you can push to PR branches |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those defines are actually a problem and may lead to compilation failures (particularly in the test_build_options.py
script
@lvale now that I have push access, I'll fix up the issues and rebase it over the weekend. |
668bdbd
to
77bd632
Compare
@lvale I have cleaned this PR up a little bit. Can you please check if this still works fine? |
@rishabsingh3003 Sorry for the delay testing. Everything looks fine, so I believe it is good to go |
77bd632
to
096276b
Compare
waiting for too long, Luis has tested this driver a lot
Merged, thanks for your patience @Adithya-Patil , @lvale |
Creating a new Innomaker LD06 LiDAR driver for proximity sensing/obstacle avoidance. Communication protocol for sensor linked here.
Closes #17211
LDROBOT_LD06_Development manual_v1.0_en.pdf