Replies: 1 comment 6 replies
-
There is an example script for cmdFullState in https://github.com/IMRCLab/crazyswarm2/blob/main/crazyflie_examples/crazyflie_examples/cmd_full_state.py, which should work both with real flight and "simulation". Note that the current simulator just visualizes the setpoint (there is no notion of physics and a controller), so the crazyflie might jump if the setpoint jumps. cmdPosition is not supported in the simulator, yet, see https://imrclab.github.io/crazyswarm2/overview.html#support-functionality-with-backends (under manual control). |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, would like to ask if anyone has any experiences with publishing setpoints in an online fashion, ie continuously publishing setpoints as Crazyflie is flying. I did notice that there's a function cmdFullState ('https://github.com/IMRCLab/crazyswarm2/blob/main/crazyflie_py/crazyflie_py/crazyflie.py#L502') and cmdPosition ('https://github.com/IMRCLab/crazyswarm2/blob/main/crazyflie_py/crazyflie_py/crazyflie.py#L618'). I tried to use them with the simulator but it didn't seem to be able to command the simulated Crazyflie to the defined setpoint.
I also noticed that the rostopic 'cmd_position' https://github.com/IMRCLab/crazyswarm2/blob/main/crazyflie_py/crazyflie_py/crazyflie.py#L192 is not available upon running the launch file
ros2 launch crazyflie launch.py backend:=sim
. The topic is only visible when running an example script for example 'ros2 run crazyflie_examples figure8 --ros-args -p use_sim_time:=True`. There also seemed to be no subscribers to the 'cmd_position' topic. While 'cmd_full_state' has a subscriber, however, even after calling the function cmdFullState, the drone did not move at all.Thank you
Beta Was this translation helpful? Give feedback.
All reactions