The velocity of crazyflie

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
gpczygpczy
Beginner
Posts: 10
Joined: Tue Jan 12, 2021 11:00 am

The velocity of crazyflie

Post 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 :)
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: The velocity of crazyflie

Post 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.
gpczygpczy
Beginner
Posts: 10
Joined: Tue Jan 12, 2021 11:00 am

Re: The velocity of crazyflie

Post 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.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: The velocity of crazyflie

Post 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.
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: The velocity of crazyflie

Post 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.
gpczygpczy
Beginner
Posts: 10
Joined: Tue Jan 12, 2021 11:00 am

Re: The velocity of crazyflie

Post 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?
gpczygpczy
Beginner
Posts: 10
Joined: Tue Jan 12, 2021 11:00 am

Re: The velocity of crazyflie

Post 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.
Post Reply