Hey,
I cannot seem to find a way to publish the Crazyflie's onboard Pose estimation values on ROS. I want to be able to use the Roll Pitch Yaw estimates to put in a neural network. I am using the crazyflie_ros package, and the crazyflie server does not automatically seem to publish these pose values. I have checked the crazyflie_server.cpp code and it looks like it should be publishing.
In short: Is there an easy way to publish the orientation angles that the cfclient shows?
I am using the latest firmware and a Crazyradio with a Crazyflie 2.1
Kind regards,
Jacob
[SOLVED] publishing Pose values
[SOLVED] publishing Pose values
Last edited by jkooi on Tue Nov 10, 2020 4:14 pm, edited 1 time in total.
Re: publishing Pose values
I quickly looked at the code as well. I guess you are talking about this line right? https://github.com/whoenig/crazyflie_ro ... r.cpp#L700
It seems that some boolean to enable logging should be turned to True ( see here)
It seems that some boolean to enable logging should be turned to True ( see here)
Re: publishing Pose values
Hey Kimberly,
Yes, i was talking about talking about that line which gives the appearance that it should be published.
I have tried to set the boolean m_enable_logging_pose to true in the private part without success (https://github.com/whoenig/crazyflie_ro ... r.cpp#L859). I am also not seeing the other enable_logging booleans being explicitly set to true, while these are being successfully published. The topics published are:
/cf1/battery
/cf1/cmd_full_state
/cf1/cmd_hover
/cf1/cmd_position
/cf1/cmd_stop
/cf1/cmd_vel
/cf1/cmd_velocity_world
/cf1/external_pose
/cf1/external_position
/cf1/imu
/cf1/magnetic_field
/cf1/packets
/cf1/pressure
/cf1/rssi
/cf1/temperature
Is there anything i could have missed?
Yes, i was talking about talking about that line which gives the appearance that it should be published.
I have tried to set the boolean m_enable_logging_pose to true in the private part without success (https://github.com/whoenig/crazyflie_ro ... r.cpp#L859). I am also not seeing the other enable_logging booleans being explicitly set to true, while these are being successfully published. The topics published are:
/cf1/battery
/cf1/cmd_full_state
/cf1/cmd_hover
/cf1/cmd_position
/cf1/cmd_stop
/cf1/cmd_vel
/cf1/cmd_velocity_world
/cf1/external_pose
/cf1/external_position
/cf1/imu
/cf1/magnetic_field
/cf1/packets
/cf1/pressure
/cf1/rssi
/cf1/temperature
Is there anything i could have missed?
Re: publishing Pose values
You need to set "enable_logging" and "enable_logging_pose" to True in your launch file (see https://github.com/whoenig/crazyflie_ro ... ch#L19-L20 for an example that has "enable_logging_pose" missing).
Re: publishing Pose values
Thank you whoenig, this worked. Also thank you kimberly for looking into it.