RPYT Commands via ROS

Post here to get support
Post Reply
haron
Beginner
Posts: 2
Joined: Sun Jun 30, 2019 3:47 am

RPYT Commands via ROS

Post by haron » Sun Jun 30, 2019 4:09 am

Hello,

I plan on using the "CPPM Emulation" (Generic Setpoint CRTP Port) interface in order to send Euler angle + Thrust commands via ROS.
I have a few questions:

1. From the documentation I noticed that Roll and Pitch are in degrees but Yaw is degrees/sec. I understand that this is due to drift issues in yaw? Is there another flight mode that can handle a yaw command rather than yaw rate?

2. What is the recommend rate to send commands over this protocol (remember, I will be using ROS)? According to this link:
https://wiki.bitcraze.io/doc:crazyflie: ... to_control
the attitude loop rate is 250Hz, so can the communication architecture handle such high rate using the CrazyRadio dongle on windows/linux?

3. Which topic should I use on the ROS end to send commands to this flight mode?

Kind Regards,
Haron



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

Re: RPYT Commands via ROS

Post by arnaud » Mon Jul 01, 2019 12:24 pm

Hi,

1. The reason for degree/s for the yaw is that it is the common way of controlling a quadcopter when flying manually. There is a parameter that allows to send absolute yaw angle instead of yaw rate: https://github.com/bitcraze/crazyflie-f ... pyt.c#L222. If you set the parameter flightmode.stabModeYaw to 1, the yaw angle you send will be used as an absolute yaw angle setpoint. You can set parameters using a service of the ros Crazyflie driver.

2. It depends of your application :-). The Crazyflie will remember the latest setpoint and you need to send setpoints at least 2 times a second to not trigger a watchdog timer that will level the Crazyflie after 0.5s and cut the motors after 1s. I would recommend at least 10Hz update rate. The radio should be able to handle 250Hz for one Crazyflie (the radio is able to handle ~800 packets per seconds each way).

3. I have not been using the ros driver recently, but sending RPYT setpoint seems to be done using a twist velocity topic: https://github.com/whoenig/crazyflie_ro ... r.cpp#L306.

haron
Beginner
Posts: 2
Joined: Sun Jun 30, 2019 3:47 am

Re: RPYT Commands via ROS

Post by haron » Wed Jul 03, 2019 5:12 am

Thank you arnaud!

I will try this soon and post the results.

Kind Regards,
Haron

Post Reply