USC-ACTLab / crazyswarm

A Large Quadcopter Swarm
MIT License
326 stars 319 forks source link

Crazyflie ROS waypoint following #164

Closed taizoonaliasgar closed 5 years ago

taizoonaliasgar commented 5 years ago

I am implementing ROS for waypoint following with aruco tag. When I run the controller.cpp at frequency greater than 8Hz, the function transformpose() (to transform world reference points to crazyflie frame) forces the controller node to exit with the error: Quaternion malformed, magnitude: 0 should be 1.0 Interestingly, I am able to run the controller at frequencies less than 5Hz. Could you please take a look at my launch file and controller.cpp for any mistakes I am making. Eagerly awaiting your response. Thank you.

Screenshot from 2019-07-16 22-22-27 Screenshot from 2019-07-16 22-22-34 Screenshot from 2019-07-16 22-22-38 Screenshot from 2019-07-16 22-22-53

whoenig commented 5 years ago

You should not use any version of crazyflie_controller. Instead, use the goTo function which uses the onboard attitude and position controller, see https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/scripts/waypoints.py for an example.

taizoonaliasgar commented 5 years ago

Thank you for your timely response. Are you suggesting I install the crayswarm repo instead of crazyflie_ros?

whoenig commented 5 years ago

You posted this question on the crazyswarm repository, so I assumed that's what you are using. For crazyflie_ros there is an example on how to use the HL mode here: https://github.com/whoenig/crazyflie_ros/blob/master/crazyflie_demo/scripts/test_high_level.py. You can also publish commands to the cmd_position topics instead in order to use the on-board position controller.

taizoonaliasgar commented 5 years ago

I am sorry. I will take it off from here.