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

pwm_input modifications #2196

Merged
merged 1 commit into from
May 24, 2015
Merged

Conversation

arbulgazar
Copy link

** Reset feature added for pwm_input driver. **
GPIO_GPIO5_OUTPUT (AUX 6 signal pin) is currently used as reset pin.
Reset is happening if pwm_input don't get any data for some time, to prevent reset-spamming while lidar is not connected ROMFS should toogle pwm_input driver on parameter. (not implemented in this fork)

** Publication to range_finder topic added **
range_finder topic is used by several sensors (pwm_input, i2c lidar interface and range_finder currently) and ROMFS should have cases to enable ony one of them.

publication to range_finder topic added
@LorenzMeier
Copy link
Member

Thanks! Doing a full review now.

@LorenzMeier
Copy link
Member

@Zefz This brings the Lidar-Lite to life. I need to think a moment about how to layer this architecturally.

@TSC21
Copy link
Member

TSC21 commented May 19, 2015

@LorenzMeier I was planning to get all rangefinders and altimeters data into DISTANCE_SENSOR message. Are there other plans (like keep using range_finder topic) or can I proceed with this? Mavros already is capable of sub and pub into DISTANCE_SENSOR msg.

@@ -70,6 +71,7 @@ MODULES += modules/commander
MODULES += modules/navigator
MODULES += modules/mavlink
MODULES += modules/gpio_led
MODULES += modules/gpio_tool
Copy link
Author

Choose a reason for hiding this comment

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

This shouldn't be there. Included for testing, forgot to remove. :(

@Zefz
Copy link
Contributor

Zefz commented May 19, 2015

LidarLite still needs working PWM drivers (#1949).

@TSC21
Copy link
Member

TSC21 commented May 20, 2015

@arbulgazar it would be awesome if you could do your changes against #2200 👍

@bansiesta
Copy link
Contributor

I can't get this to run yet, I keep getting:

nsh> pwm_input start
[pwm_input] advertising 536948912
nsh> [pwm_input] Lidar is down, reseting
[pwm_input] Lidar is down, reseting
[pwm_input] Lidar is down, reseting
...

Pin 5 and 6 are connected as shown here http://copter.ardupilot.com/wiki/common-optional-hardware/common-rangefinder-landingpage/common-rangefinder-lidarlite/#connecting_to_pixhawk_via_pwm, the rail is powered with 5v, and I'm using a 300 Ohm pull-down.

Any pointers what I'm doing wrong? Thanks.

@LorenzMeier
Copy link
Member

Try one kilo ohm instead

@LorenzMeier
Copy link
Member

Actually I think it's rather software related. Did you put FMU in PWM mode and / or disabled the driver? I need to check if there are missing dependencies / startup order things.

@bansiesta
Copy link
Contributor

Already re-soldering :). I didn't touch the fmu command...

@bansiesta
Copy link
Contributor

I switched to 1k Ohm and disabled the fmu command, still nothing!
Does the Lidar-lite have any indication that it's running? Any idea how to debug this?

@TSC21
Copy link
Member

TSC21 commented May 23, 2015

@bansiesta are you using this #1949?

@bansiesta
Copy link
Contributor

@TSC21: I'm currently trying pwm_input. Is this not needed for ll40ls start pwm?

@TSC21
Copy link
Member

TSC21 commented May 23, 2015

As @Zefz said:

LidarLite still needs working PWM drivers (#1949).

@bansiesta
Copy link
Contributor

Sorry, don't get it. Tell me what I need to run in what order and what you suspect to work.

@TSC21
Copy link
Member

TSC21 commented May 23, 2015

@bansiesta I can't really tell. From what I know, I2C drivers are working for LidarLite but have problems related to bus hold, which is a problem related to LidarLite only. That's why a PWM driver is needed. But, from what I can see, there's no current implementation for using PWM with LidarLite in the firmware, and that's what @Zefz was implementing, but it didn't finish it. So, I suspect @Zefz code must be done first before getting this to work.

@bansiesta
Copy link
Contributor

@TSC21 Understood thanks. I've already continued where @Zefz left off and I think I have an idea what is going on there. However, for the PWM part to work, this pwm_input needs to work but doesn't for me. The interrupt seems never triggered.

@bansiesta
Copy link
Contributor

Aha, seems to work now, a pwm_input test was necessary.

@TSC21
Copy link
Member

TSC21 commented May 23, 2015

Good catch :D BTW, check 43668cc. Big change on structure, as range_finder topic is totally replaced by distance_sensor.

@bansiesta
Copy link
Contributor

@TSC21: thanks for the heads-up. I'll try to merge that in later.

@arbulgazar
Copy link
Author

I wasn't modifying start-up scripts, was not sure you want lidar starting with fmu, but probably should have wrote this in comment:
pwm_input start full required in order to both initialize and start timer. pwm_input start will lead only to timer initialization. That's why you had to pwm_input test to get things working - it starts timer. This however is listed in help message you get on pwm_input.

@arbulgazar
Copy link
Author

I will do changes with respect to #2200 after week or so. Thesis is demanding time now, can't push it back.

@LorenzMeier LorenzMeier merged commit dbe58d6 into PX4:master May 24, 2015
@bansiesta
Copy link
Contributor

@arbulgazar: Thanks for your work, I based my work on it and went from there. It's merged now.

Btw:
I removed the pwm_input start full argument because the read is now triggered from the ll40ls driver. Also the pwm_input only publishes to the pwm_input topic and the ll40ls driver then converts this to a distance, etc..
This should leave the pwm_input driver as a generic interface that can be extended for other use cases.

PX4BuildBot added a commit that referenced this pull request Dec 18, 2024
    - mavlink in PX4/Firmware (8d9467d): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@2f44cef
    - Changes: mavlink/mavlink@5e3a42b...2f44cef

    2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 19, 2024
    - mavlink in PX4/Firmware (7a5494e): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@2f44cef
    - Changes: mavlink/mavlink@5e3a42b...2f44cef

    2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 19, 2024
    - mavlink in PX4/Firmware (e217eb7): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 26, 2024
    - mavlink in PX4/Firmware (27cff50): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 26, 2024
    - mavlink in PX4/Firmware (95020bb): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 27, 2024
    - mavlink in PX4/Firmware (e67ad42): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 27, 2024
    - mavlink in PX4/Firmware (c94db0d): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 28, 2024
    - mavlink in PX4/Firmware (4186b81): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 28, 2024
    - mavlink in PX4/Firmware (df875e1): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 29, 2024
    - mavlink in PX4/Firmware (44f58db): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 29, 2024
    - mavlink in PX4/Firmware (7bb7f9d): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 30, 2024
    - mavlink in PX4/Firmware (ece1d57): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 30, 2024
    - mavlink in PX4/Firmware (4d99f7e): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 31, 2024
    - mavlink in PX4/Firmware (a8d266d): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Dec 31, 2024
    - mavlink in PX4/Firmware (922f18d): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 1, 2025
    - mavlink in PX4/Firmware (f8451e0): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 1, 2025
    - mavlink in PX4/Firmware (5fb3e72): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 2, 2025
    - mavlink in PX4/Firmware (691cf1b): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 2, 2025
    - mavlink in PX4/Firmware (d9fd151): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 3, 2025
    - mavlink in PX4/Firmware (e3623cd): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 3, 2025
    - mavlink in PX4/Firmware (2ebf931): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 4, 2025
    - mavlink in PX4/Firmware (7e65b5b): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 4, 2025
    - mavlink in PX4/Firmware (b6bced6): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 5, 2025
    - mavlink in PX4/Firmware (572b272): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 5, 2025
    - mavlink in PX4/Firmware (e671dc7): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 6, 2025
    - mavlink in PX4/Firmware (f7b9069): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 6, 2025
    - mavlink in PX4/Firmware (0a4203f): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 7, 2025
    - mavlink in PX4/Firmware (50ae227): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 7, 2025
    - mavlink in PX4/Firmware (9b967fe): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 8, 2025
    - mavlink in PX4/Firmware (5846ec8): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 8, 2025
    - mavlink in PX4/Firmware (36e663a): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 9, 2025
    - mavlink in PX4/Firmware (4c767d9): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
PX4BuildBot added a commit that referenced this pull request Jan 9, 2025
    - mavlink in PX4/Firmware (df84355): mavlink/mavlink@5e3a42b
    - mavlink current upstream: mavlink/mavlink@619947d
    - Changes: mavlink/mavlink@5e3a42b...619947d

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
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.

5 participants