Page 1 of 1

The velocity of crazyflie

Posted: Thu May 27, 2021 2:01 pm
by gpczygpczy
Hello everyone!When I use the crazyflie_ros file ,I want to use the controller algorithm of myself instead of the PID algorithm,but I don't know how to get the present velocity of the crazyflie,could anyone help me.I would be really appreciate your help :)

Re: The velocity of crazyflie

Posted: Mon May 31, 2021 11:26 am
by arnaud
The velocity is available as log variable in the variables "stateEstimate.vx", "stateEstimate.vy" and "stateEstimate.vz". crazyflie_ros allows to setup logblocks to log variables at regular interval and make them available as a topic.

As an extra note: a lot of information are available as log. Currently the best way to see what is available is connect the Crazylfie with the Crazyflie client and look in the "Log TOC" tab.

Re: The velocity of crazyflie

Posted: Thu Jun 03, 2021 12:27 pm
by gpczygpczy
Thanks for replying! By the way,I want to know if I use the crazyflie_ros and I want to get the velocity of the crazyflie and use them at the same time ,should I write an node to realize it?I am a rookie to ROS,maybe ask a very basic question.I tried use cf client before,but when I want to link the crazyflie use the cf client and the ROS,it could lose connection with one of the two ways.

Re: The velocity of crazyflie

Posted: Mon Jun 07, 2021 11:14 am
by kimberly
It might be best to ask the question directly on the [issue list of the github repo of crazyflie_ros. I also notified the person that is responsible for this repository to help you out.

Re: The velocity of crazyflie

Posted: Mon Jun 07, 2021 11:34 am
by whoenig
There is no need to write a custom node. All you need to do is to enable pose logging or to set up a custom log configuration.

Re: The velocity of crazyflie

Posted: Wed Jun 09, 2021 7:56 am
by gpczygpczy
whoenig wrote: Mon Jun 07, 2021 11:34 am There is no need to write a custom node. All you need to do is to enable pose logging or to set up a custom log configuration.
Thank you for your replying!Is the enable pose logging

Code: Select all

  <group ns="crazyflie">
    <include file="$(find crazyflie_driver)/launch/crazyflie_add.launch">
      <arg name="uri" value="$(arg uri)" />
      <arg name="tf_prefix" value="crazyflie" />
      <arg name="enable_logging" value="True" />
means the "True"here?

Re: The velocity of crazyflie

Posted: Wed Jun 09, 2021 7:58 am
by gpczygpczy
kimberly wrote: Mon Jun 07, 2021 11:14 am It might be best to ask the question directly on the [issue list of the github repo of crazyflie_ros. I also notified the person that is responsible for this repository to help you out.
I really appreciate your help!I would try again.