Problem in logging z ranger data

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
thasu
Beginner
Posts: 24
Joined: Wed Oct 18, 2017 7:16 am

Problem in logging z ranger data

Post by thasu » Wed Sep 05, 2018 7:46 pm

I'm trying to read the z range values from python client by adding range.zrange to the log group. But values appear as 0 everytime. Other variables which are in the log group print corresponding values in the terminal. However there is no error showing in the CF console and set_hoverpoint command is working well for a given height. What could be the problem here?

arnaud
Bitcraze
Posts: 1752
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem in logging z ranger data

Post by arnaud » Mon Sep 10, 2018 9:15 am

There has been a log-related bug recently that could cause this to happen, are you using the very latest version of the Crazyflie firmware from git?

thasu
Beginner
Posts: 24
Joined: Wed Oct 18, 2017 7:16 am

Re: Problem in logging z ranger data

Post by thasu » Thu Sep 13, 2018 2:46 pm

Yes. What can I do to solve this problem?

arnaud
Bitcraze
Posts: 1752
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem in logging z ranger data

Post by arnaud » Mon Oct 08, 2018 10:04 am

Well if you are using the latest firmware and client things should work as expected. How do you start the log, from the client or from your own script? Can you share the procedure or code you are using?

thasu
Beginner
Posts: 24
Joined: Wed Oct 18, 2017 7:16 am

Re: Problem in logging z ranger data

Post by thasu » Mon Oct 08, 2018 1:01 pm

I'm using my own python script. For now let's say I want to use the basiclogSync file to log the zranger data.
Currently I'm using latest firmware and it has the same problem.

arnaud
Bitcraze
Posts: 1752
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem in logging z ranger data

Post by arnaud » Tue Oct 09, 2018 6:36 am

I could reproduce the problem using the client. This is a bug introduced when we added zranger2. If you remove zranger2.o from the makefile and remake the project you should get back the range again: https://github.com/bitcraze/crazyflie-f ... efile#L186.

I am creating a ticket about it, I think we need to centralize all ranging information in a separate file to make the API cleaner both from inside the Crazyflie and from the outside: https://github.com/bitcraze/crazyflie-f ... issues/374.

Post Reply