Page 1 of 1

[SOLVED] z range sensor sampling period

Posted: Thu Jun 22, 2017 5:45 am
by y.choi
Hello, I'm trying to control height of flie by PID controlling the z-ranger value
using the crazyflie ROS driver ( https://github.com/whoenig/crazyflie_ros )

However, It seems like that range.zrange value is logged and subscribed with period 100ms, i.e. 10Hz
It seems to be insufficient for control. How can I adjust the period of z range sampling? I guess the sampling rate spec of VL53L0X must not be 10Hz, it's too low

Re: z range sensor sampling period

Posted: Thu Jun 22, 2017 9:32 am
by tobias
Are you trying to do the PID regulation on the computer? The delay might be a problem.

I can't remember the fastest time the sensor can sample but it depends on the surface and environment. Think it is around every 30ms.

Re: z range sensor sampling period

Posted: Thu Jun 22, 2017 12:39 pm
by y.choi
tobias wrote:Are you trying to do the PID regulation on the computer? The delay might be a problem.

I can't remember the fastest time the sensor can sample but it depends on the surface and environment. Think it is around every 30ms.
Yes. through PID control. Then how is the height hold mode in cfclient implemented? In the same environment, client works.

In the sensor spec, it says it supports up to 50hz in "fast mode". I can't figure out what it is. 10hz is too poor

-------------------
http://www.st.com/content/ccc/resource/ ... 279088.pdf

I found the sensor programming API, and now looking over it
now I looked it over and again look over the firmware source code. Is it right that already firmware is coded to get the measurement as fast as it can?

-------------------
I found my crazyflie ROS driver subscribes /range at period 100ms regardeless of surface and environments, and tryna find out why
-------------------
now I figured it out. In crazyflie_server.cpp, logblock frequency was set by start(frequency). Thanks

Re: [SOLVED] z range sensor sampling period

Posted: Tue Jun 27, 2017 7:47 am
by arnaud
Does it mean that the log frequency was wrong? What change did you have to do to make it work?

Re: [SOLVED] z range sensor sampling period

Posted: Tue Jun 27, 2017 10:01 am
by tobias
The code as it is now is setup to take measurements with the vl53 as fast as possible.

Re: [SOLVED] z range sensor sampling period

Posted: Wed Sep 13, 2017 5:30 am
by xorb0181
@y.choi

How did you get the zrange value from CF firmware via ROS package by whoing?

Re: [SOLVED] z range sensor sampling period

Posted: Wed Sep 13, 2017 8:22 am
by arnaud
You can setup log block with the ROS package so you can setup a log block that gets the zRanger range and publish it as a topic at regular interval.