Closed xiaoshan-lin closed 8 months ago
Does the Crazyflie firmware need to know the position of turtlebot_1 and turtlebot_2?
The only difference is that this information will be also send via broadcast to all Crazyflies. This might require an additional packet, which can slow down unicasts.
Perhaps you can post the output of one of the /cf
Thank you for responding so quickly.
The crazyswarm firmware doesn't need to know the position of turtlebot_1 and turtlebot2.
This totally makes sense. I ran a few more tests and found there is no slowdown when I enable just 1 crazyflie and 1 turtlebot. If I increase the number of robots, the frequency will drop.
Are /connection_statistics and /status ros topics? I couldn't find them after I launch the crazyswarm.
>> ros2 topic list
/all/cmd_full_state
/cf04/battery_status
/cf04/cmd_full_state
/cf04/cmd_position
/cf04/cmd_vel_legacy
/cf04/pose
/cf06/battery_status
/cf06/cmd_full_state
/cf06/cmd_position
/cf06/cmd_vel_legacy
/cf06/pose
/cf6/cmd_full_state
/cf6/cmd_vel_legacy
/clicked_point
/clock
/goal_pose
/initialpose
/joy
/joy/set_feedback
/parameter_events
/pointCloud
/poses
/rosout
/tf
/tf_static
Both are ROS topics, but need to be enabled and are only available in "newer" versions. For connection_statistics, use https://github.com/IMRCLab/crazyswarm2/blob/main/crazyflie/config/server.yaml#L12. For status use https://github.com/IMRCLab/crazyswarm2/blob/main/crazyflie/config/crazyflies.yaml#L80-L81 (note that status also contains the variables you are interested in, in addition to some connection statistics).
In order to avoid sending the position to the firmware, you could comment out https://github.com/IMRCLab/crazyswarm2/blob/261f3e8ef688a21a378e7febd68e95d4ec95be73/crazyflie/src/crazyflie_server.cpp#L1068 (and recompile). The code would need some updates to support this case without modifications (e.g., by not specifying an id).
Thank you for sharing these new updates. We are currently on a older commit, but will definitely check out the latest version!
Commenting update_name_to_id_map(name, id);
resolves our issue.
Thank you again for your help!
To avoid sending the positions of non-crazyflie objects to the firmware, do we need to comment out any lines in crazyflie_server.py, if we use the cflib backend?
Descriptions: We have a custom topic to log two parameters: pm.state and pm.vbat. The custom topic is published at a desired rate (10Hz) when running multiple crazyflies. However, if we add non-crazyflie objects in the yaml file, the topic will significantly slow down (< 0.5 hz), and sometimes even stop publishing. We use crazyradio PA, and the firmware of the crazyflie is 23.11. The crazyflies.yaml is attached here.
Questions:
We add tubtlebots as non-crazyflie objects in the yaml file as below, but not sure if we configure them correctly. Does the id of the non-crazyflie object matter? We put id 254 and 255 (see documentation).
Thank you for your help and support!