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

uavcan flow support (Here Flow) #12477

Merged
merged 9 commits into from
Aug 15, 2019
Merged

uavcan flow support (Here Flow) #12477

merged 9 commits into from
Aug 15, 2019

Conversation

DanielePettenuzzo
Copy link
Contributor

This uavcan driver adds support for the pmw3901 via uavcan. It was tested and the data in uorb looks valid. The remaining issue is that we cannot generate the uavcan header inside px4 for this custom message. To test this we generated the header manually and then copied it into src/drivers/uavcan/libuavcan/libuavcan/include/dsdlc_generated. It would be great to find a way to have a directory in px4 where we can generate our own headers.

Once we figure this out I will clean this up for merging.

Signed-off-by: DanielePettenuzzo <[email protected]>
@DanielePettenuzzo
Copy link
Contributor Author

FYI @dagar @RomanBapst @bkueng

src/drivers/uavcan/sensors/flow.cpp Outdated Show resolved Hide resolved
@@ -0,0 +1,4 @@
float32 integration_interval # Integration Interval in seconds
float32[2] rate_gyro_integral # Integrated Gyro Data in radians
Copy link
Contributor

Choose a reason for hiding this comment

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

Add better comments about axis

Copy link
Member

Choose a reason for hiding this comment

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

We should probably keep it identical in case it ever needs to update.
https://github.com/OpenMotorDrive/flow/blob/master/dsdl/com/hex/equipment/flow/20200.Measurement.uavcan.

Copy link
Member

Choose a reason for hiding this comment

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

Replaced with the source message. Should we comment it properly upstream? https://github.com/OpenMotorDrive/flow/blob/master/dsdl/com/hex/equipment/flow/20200.Measurement.uavcan

@dagar dagar requested a review from RomanBapst August 3, 2019 01:23
@dagar dagar changed the title [WIP] initial commit for uavcan flow support uavcan flow support (Here Flow) Aug 3, 2019
@dagar dagar self-requested a review August 3, 2019 01:23
@dagar
Copy link
Member

dagar commented Aug 3, 2019

@DanielePettenuzzo @RomanBapst I've brought the DSDL generation into the PX4 uavcan driver and cleaned up some of the unnecessary parts (ioctl and read methods aren't even used). This is good to go from my perspective.

dagar
dagar previously approved these changes Aug 3, 2019
@DanielePettenuzzo
Copy link
Contributor Author

uavcan_flow

@dagar Bench tested this today.. I think we can merge this. I will try to fly it tomorrow or early next week.

The first part of the log I do rotations (flow and gyro very similar) and in the second part I do horizontal translation (flow larger than gyro).

@DanielePettenuzzo
Copy link
Contributor Author

In a separate pr I will add support for the distance sensor on this module

@dagar dagar merged commit be3d09c into master Aug 15, 2019
@dagar dagar deleted the pr-can-flow-support branch August 15, 2019 16:22
@proficnc
Copy link

That’s awesome guy’s!

@hamishwillee
Copy link
Contributor

@dagar @DanielePettenuzzo @RomanBapst What's the doc requirement here?

What we at the moment is an Optical Flow page that has a subpage for PX4 flow. Basically I need to know how the setup differs for UAVCAN - ie which parameters still need to be set, and tuned, how the wiring is done, any new setup that needs to be done for UAVCAN Flow - ie new params to enable it, any limitations that come from using UAVCAN vs using any other distance sensor.

With respect to Here Flow I need to know if there is any special setup or tuning. For example, focussing the camera is covered for PX4Flow doc.

Can you guys look at optical flow page and PX4 flow doc and provide some sort of delta summary?

@hamishwillee hamishwillee added the Documentation 📑 Anything improving the documentation of the code / ecosystem label Aug 15, 2019
@TSC21
Copy link
Member

TSC21 commented Aug 16, 2019

@hamishwillee @DanielePettenuzzo I am getting a couple of these units soon and would be interested to know, as @hamishwillee said, how these can be configured. Also, @DanielePettenuzzo is the lidar module mandatory to have it fly, similar to the PX4Flow, since you need to have the distance to the ground to determine the horizontal velocity?

@DanielePettenuzzo
Copy link
Contributor Author

@dagar @hamishwillee I started the PMW3901 page in the user guide because it's different from the PX4 Flow. I think we should have a generic optical flow page and then subpages explaining the PX4FLOW and the PMW3901. We can move the conversation to this pr in the user guide: PX4/PX4-user_guide#559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin: Enhancement (improvement) 💡 Documentation 📑 Anything improving the documentation of the code / ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants