Skip to content
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

added sf45 as a seperate rangefinder #3448

Merged
merged 13 commits into from
Dec 17, 2024
Merged

added sf45 as a seperate rangefinder #3448

merged 13 commits into from
Dec 17, 2024

Conversation

Claudio-Chies
Copy link
Member

@Claudio-Chies Claudio-Chies commented Nov 11, 2024

  • Adapted and updated the documentation for the SF45 Rangefinder
  • Added it to sensors instead of a chapter in collision prevention, although thats the main usecase.
  • marked the Lanbao Sensor as EOL, as i cant find it available anymore, and some sellers marked it as EOL

Relevant PR's

@hamishwillee
Copy link
Collaborator

This is IMO ready when your PR is ready - thanks very much!!! I did some restructure to make the new rangefinder doc a sub-doc - that allows us to expand the structure if we want in future.

Note that the build error can be ignored. It happens because I moved one of the image files alongside the other, and the existing translations depend on that location. This will be fixed after merging by crowdin.

@hamishwillee
Copy link
Collaborator

I've separately added a PR the lanbao, so that this isn't mixed in with this PR about #3487


<video src="../../assets/hardware/sensors/lidar_lightware/sf45_plotjuggler.mp4" width="720" controls></video>

In order to generate this kind of plot you will need to add the following Reactive Scripts to PlotJuggler.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a Reactive Script? Is there a good link to a definition we can add here for someone wanting to learn more?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reactive scripts are Lua scripts inside plot juggler, sadly the documentation for PlotJuggler is severely lacking. So there's no good source on what it actually is.

In order to generate this kind of plot you will need to add the following Reactive Scripts to PlotJuggler.
If you save these scripts and then add new data, you will see a new timeseries called `obstacle_distance_xy`, which is the same as is displayed in the video.

**Global code, executed once:**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it bleedingly obvious how you execute/add these scripts? If not then we need to either add a link to instructions or explain how here. Up to you which.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly not, i'll add a screenshot, and mention where the setting is.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Claudio-Chies I'm going to merge this, but ...

I've added a tip above in 55fcd83 to link to the more extensive example you provided in Collision prevention.

Do we need both sets of scripts and examples? In the tip I have said "go here for more info" since that shows how to get scripts working, but they do more or less the same thing right? I wonder if having two scripts like this makes sense? [why wouldn't you just use the collision prevention stuff?]

@hamishwillee
Copy link
Collaborator

Can we get the video on PX4 youtube and link it. The file is not huge, but obviously it is cheaper if authors don't have to download it for local editing

@Claudio-Chies
Copy link
Member Author

a video of the SF45. the plotjuggler layout or of the drone flying?

@hamishwillee
Copy link
Collaborator

a video of the SF45. the plotjuggler layout or of the drone flying?

The plotjuggler layout. Sorted by the other PR probably.

@Claudio-Chies
Copy link
Member Author

@hamishwillee how could I get the video onto PX4 YouTube?

@hamishwillee
Copy link
Collaborator

You want the one in this PR too? I can upload it for you if you want?

@Claudio-Chies
Copy link
Member Author

Might make sense to keep the filesize low? i think here its a good visualisation on how the sensor operates

@hamishwillee
Copy link
Collaborator

No wo;rries. File is uploading. Link will be https://youtu.be/VwEd_7aiLEo

@Claudio-Chies
Copy link
Member Author

@hamishwillee this would be ready to merge, as the parent was merged

@hamishwillee hamishwillee merged commit d92f0e5 into main Dec 17, 2024
1 check passed
@hamishwillee hamishwillee deleted the pr-sf45 branch December 17, 2024 22:49
Copy link

No flaws found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants