USC-ACTLab / crazyswarm

A Large Quadcopter Swarm
MIT License
328 stars 323 forks source link

I can not fly hover_swarm.launch #700

Closed powehi2020 closed 1 year ago

powehi2020 commented 2 years ago

I can not fly hover. Can you give me some advice ? Thank you very much!

hover_swarm.launch

<?xml version="1.0"?>

# Logging configuration (Use enable_logging to actually enable logging) genericLogTopics: ["log1"] genericLogTopicFrequencies: [10] genericLogTopic_log1_Variables: ["stateEstimate.x", "ctrltarget.x"] # firmware parameters for all drones (use crazyflieTypes.yaml to set per type, or # allCrazyflies.yaml to set per drone) firmwareParams: commander: enHighLevel: 1 stabilizer: estimator: 2 # 1: complementary, 2: kalman controller: 2 # 1: PID, 2: mellinger ring: effect: 16 # 6: double spinner, 7: solid color, 16: packetRate solidBlue: 255 # if set to solid color solidGreen: 0 # if set to solid color solidRed: 0 # if set to solid color headlightEnable: 0 locSrv: extPosStdDev: 1e-3 extQuatStdDev: 0.5e-1 kalman: resetEstimation: 1 # tracking motion_capture_type: "optitrack" # one of none,vicon,optitrack,optitrack_closed_source,qualisys,vrpn object_tracking_type: "motionCapture" # one of motionCapture,libobjecttracker send_position_only: False # set to False to send position+orientation; set to True to send position only motion_capture_host_name: "192.168.2.10" # motion_capture_interface_ip: "192.168.2.10" # optional for optitrack with multiple interfaces save_point_clouds: "/dev/null" # set to a valid path to log mocap point cloud binary file. print_latency: False write_csvs: False force_no_cache: False enable_parameters: True enable_logging: False enable_logging_pose: True

crazyflie.yalm

crazyflies:

when I run hover_swarm.launch

(base) lkder@microvr:~$ roslaunch crazyswarm hover_swarm.launch ... logging to /home/lkder/.ros/log/82e59074-4fae-11ed-998c-dc215c73684c/roslaunch-microvr-2788.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://microvr:44543/

SUMMARY

PARAMETERS

NODES / crazyswarm_server (crazyswarm/crazyswarm_server) crazyswarm_teleop (crazyswarm/crazyswarm_teleop) joy (joy/joy_node) rviz (rviz/rviz)

auto-starting new master process[master]: started with pid [2798] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 82e59074-4fae-11ed-998c-dc215c73684c process[rosout-1]: started with pid [2809] started core service [/rosout] process[crazyswarm_server-2]: started with pid [2816] process[joy-3]: started with pid [2817] [ERROR] [1666184646.236973117]: Couldn't open joystick /dev/input/js0. Will retry every second. process[crazyswarm_teleop-4]: started with pid [2823] process[rviz-5]: started with pid [2824] [ INFO] [1666184646.253773216]: Wait for services... [ INFO] [1666184646.254443637]: waitForService: Service [/emergency] has not been advertised, waiting... [ INFO] [1666184646.274997341]: waitForService: Service [/emergency] is now available. [ INFO] [1666184646.275733666]: Manager ready. [ INFO] [1666184646.277199814]: libmotioncapture connecting to optitrack at hostname '192.168.2.10' - might block indefinitely if unreachable! ch: 1 [ INFO] [1666184646.285424382]: Parsed crazyflies.yaml successfully. [ INFO] [1666184646.285442137]: Adding CF: cf1 (radio://0/90/2M/E7E7E7E701, cf1)... terminate called after throwing an instance of 'std::runtime_error' what(): timeout [crazyswarm_server-2] process has died [pid 2816, exit code -6, cmd /home/lkder/crazyswarm/ros_ws/devel/lib/crazyswarm/crazyswarm_server __name:=crazyswarm_server __log:=/home/lkder/.ros/log/82e59074-4fae-11ed-998c-dc215c73684c/crazyswarm_server-2.log]. log file: /home/lkder/.ros/log/82e59074-4fae-11ed-998c-dc215c73684c/crazyswarm_server-2*.log ^C[rviz-5] killing on exit [crazyswarm_teleop-4] killing on exit [joy-3] killing on exit [rosout-1] killing on exit [master] killing on exit shutting down processing monitor... ... shutting down processing monitor complete done

when I run mocap_helper.launch

(base) lkder@microvr:~$ roslaunch crazyswarm mocap_helper.launch ... logging to /home/lkder/.ros/log/24ebd44a-4fb5-11ed-bd10-dc215c73684c/roslaunch-microvr-2666.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://microvr:34245/

SUMMARY

PARAMETERS

NODES / mocap_helper (crazyswarm/mocap_helper)

auto-starting new master process[master]: started with pid [2676] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 24ebd44a-4fb5-11ed-bd10-dc215c73684c process[rosout-1]: started with pid [2687] started core service [/rosout] process[mocap_helper-2]: started with pid [2694] frame 0: points: "0": [1.39406,-2.84672,0.794895] "1": [1.40177,-2.97268,0.855049] "2": [1.12558,-5.93248,1.67437] "3": [-1.38026,-8.12686,1.54381] rigidBodies: frame 1: points: "0": [1.39405,-2.8469,0.794956] "1": [1.40179,-2.97252,0.855003] "2": [1.1256,-5.93254,1.67438] "3": [-1.38027,-8.12679,1.54381] rigidBodies: frame 2: points: "0": [1.39405,-2.84702,0.795013] "1": [1.40178,-2.97272,0.85504] "2": [1.12552,-5.93253,1.67445] "3": [-1.38035,-8.127,1.54384] rigidBodies: frame 3: points: "0": [1.39386,-2.84954,0.795732] "1": [-1.98693,-3.03432,0.549651] "2": [1.03006,-5.66996,2.22026] "3": [1.40179,-2.97263,0.854977] "4": [1.12554,-5.93257,1.67444] "5": [-1.38039,-8.12688,1.5438] rigidBodies: frame 4: points: "0": [1.39377,-2.85007,0.795918] "1": [-1.98692,-3.03421,0.549653] "2": [1.03009,-5.67007,2.22033] "3": [1.40179,-2.97256,0.854997] "4": [1.12552,-5.93257,1.67447] "5": [-1.3804,-8.12698,1.54382] rigidBodies: frame 5: points: "0": [1.12552,-5.93251,1.67447] "1": [0.596021,-4.5219,1.61042] "2": [1.03009,-5.67011,2.22035] "3": [1.12552,-5.93251,1.67447] "4": [0.596021,-4.5219,1.61042] "5": [1.03009,-5.67011,2.22035] "6": [1.39379,-2.85027,0.795975] "7": [-1.98693,-3.03429,0.549647] "8": [1.4018,-2.97242,0.854939] "9": [-1.38042,-8.12724,1.54386] rigidBodies: "cf1": position: [0.917211, -5.37484, 1.83508] rotation: [-1, -4.14103e-05, 1.34762e-05, -3.08305e-05]

Murphy103 commented 1 year ago

I had the same problem, how did you fix it later?