Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Exception thrown while processing service call: timeout” error #272

Open
manikamakam opened this issue Nov 9, 2020 · 16 comments
Open

Comments

@manikamakam
Copy link

Hello,

I am trying to use the crazyswarm repo to fly two crazyflies (for now) using VICON system. I have gotten to a place where our ROS system recognizes the existence of crazyflies. I verified this with the provided chooser.py script.

First issue: If I click reboot, I can observe the crazyflies switching off and turning back on, thus proving that the connection is established. However, if I click on battery, I see 0.00V for both of them though their batteries are charged. I'm not sure why reboot is working but not the battery option.
Screenshot from 2020-11-06 12-11-48

Second issue: I've selected only one crazyflie from the chooser.py. Before going to VICON, I want to fly the crazyflie with joystick. When I run roslaunch crazyflie_demo teleop_xbox360.launch uri:=radio://0/100/2M, it throws an error saying “Exception thrown while processing service call: timeout”. No values were found in the IMU topic and we can’t see the crazyflie on the RViz display. The uri is correct as I cross-verified by running rosrun crazyflie_tools scan -v. I think the connection is established as the reboot is working in chooser.py script. But I'm unsure on why I'm facing this error.

Screenshot from 2020-11-06 12-13-18

Any suggestions to solve these issues would be greatly appreciated. Thank you.

@whoenig
Copy link
Contributor

whoenig commented Nov 9, 2020

  1. Did you update your NRF firmware as well as the Crazyradio firmware? Wrong battery measurements usually indicate that there is a mismatch in the versions (the communication protocol changed slightly over the versions).
  2. Teleoperation is (currently) not supported with the Crazyswarm. You should use hover_swarm.launch instead and navigate using trajectories or waypoints. It would be easy to add Joystick control, but there is just no out-of-the-box example, yet.

@manikamakam
Copy link
Author

manikamakam commented Nov 13, 2020

Thank you for your response. I've previously updates crazyflies but not the radio. By updating radio, I'm able to get battery values. I have two other issues now.

  1. While I'm building the repository, I get the following
    arm-none-eabi-size cf2_nrf.elf
    text data bss dec hex filename
    63924 604 4888 69416 10f28 cf2_nrf.elf
    S110 Activated
    BLE Disabled
    Built for platform cf2
    fatal: reference is not a tree: 82e80521124c6e96e5fdb3538a2533f994e2db8f
    Unable to checkout '82e80521124c6e96e5fdb3538a2533f994e2db8f' in submodule path 'vendor/FreeRTOS

I'm able to run all the codes but I was just wondering why is it not able to checkout that specific sub-module. All the other sub-modules are updated.

  1. I'm running the roslaunch crazyswarm hover_swarm.launch command. But I get the below output:

... logging to /home/ottelab/.ros/log/03bada0c-25da-11eb-8272-9cefd5fcd5b4/roslaunch-ottelab-Precision-Tower-3620-24472.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ottelab-Precision-Tower-3620:43053/

SUMMARY

PARAMETERS

  • /crazyflieTypes/CF21SingleMarker/batteryVoltageWarning: 3.8
  • /crazyflieTypes/CF21SingleMarker/batteryVoltateCritical: 3.7
  • /crazyflieTypes/CF21SingleMarker/bigQuad: False
  • /crazyflieTypes/CF21SingleMarker/dynamicsConfiguration: 0
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/i_range_m_z: 1500
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/i_range_xy: 2.0
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/i_range_z: 0.4
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kR_xy: 70000
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kR_z: 60000
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kd_omega_rp: 200
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kd_xy: 0.2
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kd_z: 0.4
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/ki_m_z: 500
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/ki_xy: 0.05
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/ki_z: 0.05
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kp_xy: 0.4
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kp_z: 1.25
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kw_xy: 20000
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/kw_z: 12000
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/mass: 0.032
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/ctrlMel/massThrust: 132000
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/kalman/mNGyro_rollpitch: 0.1
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/kalman/mNGyro_yaw: 0.1
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/kalman/pNAcc_xy: 1.0
  • /crazyflieTypes/CF21SingleMarker/firmwareParams/kalman/pNAcc_z: 2.0
  • /crazyflieTypes/CF21SingleMarker/markerConfiguration: 3
  • /crazyflieTypes/default/batteryVoltageWarning: 3.8
  • /crazyflieTypes/default/batteryVoltateCritical: 3.7
  • /crazyflieTypes/default/bigQuad: False
  • /crazyflieTypes/default/dynamicsConfiguration: 0
  • /crazyflieTypes/default/firmwareParams/ctrlMel/i_range_m_z: 1500
  • /crazyflieTypes/default/firmwareParams/ctrlMel/i_range_xy: 2.0
  • /crazyflieTypes/default/firmwareParams/ctrlMel/i_range_z: 0.4
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kR_xy: 70000
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kR_z: 60000
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kd_omega_rp: 200
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kd_xy: 0.2
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kd_z: 0.4
  • /crazyflieTypes/default/firmwareParams/ctrlMel/ki_m_z: 500
  • /crazyflieTypes/default/firmwareParams/ctrlMel/ki_xy: 0.05
  • /crazyflieTypes/default/firmwareParams/ctrlMel/ki_z: 0.05
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kp_xy: 0.4
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kp_z: 1.25
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kw_xy: 20000
  • /crazyflieTypes/default/firmwareParams/ctrlMel/kw_z: 12000
  • /crazyflieTypes/default/firmwareParams/ctrlMel/mass: 0.032
  • /crazyflieTypes/default/firmwareParams/ctrlMel/massThrust: 132000
  • /crazyflieTypes/default/markerConfiguration: 0
  • /crazyflieTypes/defaultSingleMarker/batteryVoltageWarning: 3.8
  • /crazyflieTypes/defaultSingleMarker/batteryVoltateCritical: 3.7
  • /crazyflieTypes/defaultSingleMarker/bigQuad: False
  • /crazyflieTypes/defaultSingleMarker/dynamicsConfiguration: 0
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/i_range_m_z: 1500
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/i_range_xy: 2.0
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/i_range_z: 0.4
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kR_xy: 70000
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kR_z: 60000
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kd_omega_rp: 200
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kd_xy: 0.2
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kd_z: 0.4
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/ki_m_z: 500
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/ki_xy: 0.05
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/ki_z: 0.05
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kp_xy: 0.4
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kp_z: 1.25
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kw_xy: 20000
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/kw_z: 12000
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/mass: 0.032
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/ctrlMel/massThrust: 132000
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/kalman/mNGyro_rollpitch: 0.2
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/kalman/mNGyro_yaw: 0.1
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/kalman/pNAcc_xy: 4.0
  • /crazyflieTypes/defaultSingleMarker/firmwareParams/kalman/pNAcc_z: 8.0
  • /crazyflieTypes/defaultSingleMarker/markerConfiguration: 3
  • /crazyflieTypes/large/batteryVoltageWarning: 11.4
  • /crazyflieTypes/large/batteryVoltateCritical: 11.1
  • /crazyflieTypes/large/bigQuad: True
  • /crazyflieTypes/large/dynamicsConfiguration: 0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/i_range_m_z: 1500
  • /crazyflieTypes/large/firmwareParams/ctrlMel/i_range_xy: 2.0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/i_range_z: 4.0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kR_xy: 30000
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kR_z: 40000
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kd_omega_rp: 100
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kd_xy: 3.0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kd_z: 3.0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/ki_m_z: 500
  • /crazyflieTypes/large/firmwareParams/ctrlMel/ki_xy: 1.0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/ki_z: 2.0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kp_xy: 8.0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kp_z: 8.0
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kw_xy: 9000
  • /crazyflieTypes/large/firmwareParams/ctrlMel/kw_z: 10000
  • /crazyflieTypes/large/firmwareParams/ctrlMel/mass: 0.38
  • /crazyflieTypes/large/firmwareParams/ctrlMel/massThrust: 5400
  • /crazyflieTypes/large/markerConfiguration: 2
  • /crazyflieTypes/medium/batteryVoltageWarning: 7.6
  • /crazyflieTypes/medium/batteryVoltateCritical: 7.4
  • /crazyflieTypes/medium/bigQuad: True
  • /crazyflieTypes/medium/dynamicsConfiguration: 0
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/i_range_m_z: 1500
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/i_range_xy: 2.0
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/i_range_z: 2.0
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kR_xy: 50000
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kR_z: 60000
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kd_omega_rp: 200
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kd_xy: 1.0
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kd_z: 1.0
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/ki_m_z: 500
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/ki_xy: 0.1
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/ki_z: 0.5
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kp_xy: 2.0
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kp_z: 3
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kw_xy: 16000
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/kw_z: 12000
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/mass: 0.11
  • /crazyflieTypes/medium/firmwareParams/ctrlMel/massThrust: 23000
  • /crazyflieTypes/medium/markerConfiguration: 1
  • /crazyflies: [{'initialPositio...
  • /crazyswarm_server/enable_logging: False
  • /crazyswarm_server/enable_parameters: True
  • /crazyswarm_server/firmwareParams/commander/enHighLevel: 1
  • /crazyswarm_server/firmwareParams/kalman/resetEstimation: 1
  • /crazyswarm_server/firmwareParams/locSrv/extPosStdDev: 1e-3
  • /crazyswarm_server/firmwareParams/locSrv/extQuatStdDev: 0.05
  • /crazyswarm_server/firmwareParams/ring/effect: 16
  • /crazyswarm_server/firmwareParams/ring/headlightEnable: 0
  • /crazyswarm_server/firmwareParams/ring/solidBlue: 255
  • /crazyswarm_server/firmwareParams/ring/solidGreen: 0
  • /crazyswarm_server/firmwareParams/ring/solidRed: 0
  • /crazyswarm_server/firmwareParams/stabilizer/controller: 2
  • /crazyswarm_server/firmwareParams/stabilizer/estimator: 2
  • /crazyswarm_server/force_no_cache: False
  • /crazyswarm_server/genericLogTopicFrequencies: [10]
  • /crazyswarm_server/genericLogTopic_log1_Variables: ['stateEstimate.x...
  • /crazyswarm_server/genericLogTopics: ['log1']
  • /crazyswarm_server/motion_capture_type: vicon
  • /crazyswarm_server/object_tracking_type: motionCapture
  • /crazyswarm_server/print_latency: False
  • /crazyswarm_server/save_point_clouds: ~/pointCloud.ot
  • /crazyswarm_server/send_position_only: False
  • /crazyswarm_server/vicon_host_name: 192.168.10.189
  • /crazyswarm_server/world_frame: /world
  • /crazyswarm_server/write_csvs: False
  • /crazyswarm_teleop/csv_file: /home/ottelab/cra...
  • /crazyswarm_teleop/timescale: 0.8
  • /dynamicsConfigurations/0/maxFitnessScore: 0.001
  • /dynamicsConfigurations/0/maxPitch: 1.4
  • /dynamicsConfigurations/0/maxPitchRate: 20.0
  • /dynamicsConfigurations/0/maxRoll: 1.4
  • /dynamicsConfigurations/0/maxRollRate: 20.0
  • /dynamicsConfigurations/0/maxXVelocity: 2.0
  • /dynamicsConfigurations/0/maxYVelocity: 2.0
  • /dynamicsConfigurations/0/maxYawRate: 10.0
  • /dynamicsConfigurations/0/maxZVelocity: 3.0
  • /joy/dev: /dev/input/js0
  • /markerConfigurations/0/numPoints: 4
  • /markerConfigurations/0/offset: [0.0, -0.01, -0.04]
  • /markerConfigurations/0/points/0: [0.0177184, 0.013...
  • /markerConfigurations/0/points/1: [-0.0262914, 0.05...
  • /markerConfigurations/0/points/2: [-0.0328889, -0.0...
  • /markerConfigurations/0/points/3: [0.0431307, -0.03...
  • /markerConfigurations/1/numPoints: 4
  • /markerConfigurations/1/offset: [0.0, 0.0, -0.03]
  • /markerConfigurations/1/points/0: [-0.00896228, -0....
  • /markerConfigurations/1/points/1: [-0.0156318, 0.09...
  • /markerConfigurations/1/points/2: [0.0461693, -0.08...
  • /markerConfigurations/1/points/3: [-0.0789959, -0.0...
  • /markerConfigurations/2/numPoints: 4
  • /markerConfigurations/2/offset: [0.0, 0.0, -0.06]
  • /markerConfigurations/2/points/0: [0.0558163, -0.00...
  • /markerConfigurations/2/points/1: [-0.0113941, 0.00...
  • /markerConfigurations/2/points/2: [-0.0306277, 0.05...
  • /markerConfigurations/2/points/3: [0.0535816, -0.04...
  • /markerConfigurations/3/numPoints: 1
  • /markerConfigurations/3/offset: [0.0, -0.01, -0.04]
  • /markerConfigurations/3/points/0: [0.0177184, 0.013...
  • /numDynamicsConfigurations: 1
  • /numMarkerConfigurations: 4
  • /rosdistro: kinetic
  • /rosversion: 1.12.16

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 [24482]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 03bada0c-25da-11eb-8272-9cefd5fcd5b4
process[rosout-1]: started with pid [24495]
started core service [/rosout]
process[crazyswarm_server-2]: started with pid [24512]
process[joy-3]: started with pid [24513]
process[crazyswarm_teleop-4]: started with pid [24515]
process[rviz-5]: started with pid [24541]
[ INFO] [1605290386.724675646]: Wait for services...
[ INFO] [1605290386.725184977]: waitForService: Service [/emergency] has not been advertised, waiting...
[ INFO] [1605290386.746116698]: waitForService: Service [/emergency] is now available.
[ INFO] [1605290386.747331887]: Manager ready.
ch: 1
[ INFO] [1605290386.758435146]: Adding CF: cf1 (radio://0/100/2M/E7E7E7E701, cf1)...
[ INFO] [1605290386.774208498]: CF ctor: 0.015711 s
[ INFO] [1605290386.778600407]: [cf1] SYS: ----------------------------
[ INFO] [1605290386.780854452]: [cf1] SYS: Crazyflie 2.1 is up and running!
[ INFO] [1605290386.782920460]: [cf1] SYS: Production release 2020.09
[ERROR] [1605290386.784447408]: Couldn't open joystick force feedback!
[ INFO] [1605290386.784484552]: Opened joystick: /dev/input/js0. deadzone_: 0.050000.
[ INFO] [1605290386.786371345]: [cf1] SYS: I am 0x203937434848501700330052 and I have 1024KB of flash!
[ INFO] [1605290386.788508045]: [cf1] DECK_CORE: 0 deck(s) found
[ INFO] [1605290386.790798374]: [cf1] IMU: BMI088 Gyro I2C connection [OK].
[ INFO] [1605290386.792580968]: [cf1] on [OK]
[ INFO] [1605290386.794724972]: [cf1] IMU: BMP388 I2C connection [OK]
[ INFO] [1605290386.797108764]: [cf1] ESTIMATOR: Using Complementary (1) estimator
[ INFO] [1605290386.799377230]: [cf1] CONTROLLER: Using PID (1) controller
[ INFO] [1605290386.803022758]: [cf1] MTR-DRV: Using brushed motor dEEPROM: I2C connection [OK].
[ INFO] [1605290386.805177575]: [cf1] IMU: BMI088 gyro self-test [OK]
[ INFO] [1605290386.807404536]: [cf1] STAB: Wait for sensor calibration...
[ INFO] [1605290386.808746265]: [cf1] SYS: Free heap: 13216 bytes
[ INFO] [1605290386.809909333]: [cf1] STAB: Ready to fly.
[ INFO] [1605290386.810650375]: [cf1] Requesting parameters...
[ INFO] [1605290386.831014107]: Found variables in cache.
[ WARN] [1605290387.032906070]: [cf1] Link Quality low (0.680000)
[ WARN] [1605290387.117544339]: [cf1] Link Quality low (0.330000)
[ WARN] [1605290387.204665980]: [cf1] Link Quality low (0.170000)
[ WARN] [1605290387.291808531]: [cf1] Link Quality low (0.140000)
[ INFO] [1605290387.394887943]: [cf1] reqParamTOC: 0.620640 s (201 params)
[ INFO] [1605290387.394914133]: Requesting memories...
[ INFO] [1605290387.410716625]: Memories: 9
[ INFO] [1605290387.455907274]: [cf1] Ready. Elapsed: 0.681630 s
[ INFO] [1605290387.455983607]: CF run: 0.681770 s
update commander/enHighLevel to 1
update kalman/resetEstimation to 1
update locSrv/extPosStdDev to 0.001
update locSrv/extQuatStdDev to 0.05
update ring/effect to 16
update ring/headlightEnable to 0
update ring/solidBlue to 255
update ring/solidGreen to 0
update ring/solidRed to 0
update stabilizer/controller to 2
update stabilizer/estimator to 2
update ctrlMel/i_range_m_z to 1500
update ctrlMel/i_range_xy to 2
update ctrlMel/i_range_z to 0.4
update ctrlMel/kR_xy to 70000
update ctrlMel/kR_z to 60000
update ctrlMel/kd_omega_rp to 200
update ctrlMel/kd_xy to 0.2
update ctrlMel/kd_z to 0.4
update ctrlMel/ki_m_z to 500
update ctrlMel/ki_xy to 0.05
update ctrlMel/ki_z to 0.05
update ctrlMel/kp_xy to 0.4
update ctrlMel/kp_z to 1.25
update ctrlMel/kw_xy to 20000
update ctrlMel/kw_z to 12000
update ctrlMel/mass to 0.032
update ctrlMel/massThrust to 132000
[ INFO] [1605290387.478725571]: [cf1] Update parameters
[ WARN] [1605290387.500919177]: [cf1] Link Quality low (0.230000)
[ INFO] [1605290387.509614304]: [cf1] , resetting
[ WARN] [1605290387.588336129]: [cf1] Link Quality low (0.380000)
[ INFO] [1605290387.613173172]: Update params: 0.157125 s
[ INFO] [1605290387.613378673]: Started 1 threads
crazyswarm_server: /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:109: Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 16>::plain_array() [with T = float; int Size = 4; int MatrixOrArrayOptions = 0]: Assertion `(reinterpret_cast<size_t>(eigen_unaligned_array_assert_workaround_gcc47(array)) & (15)) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ***"' failed.
[crazyswarm_server-2] process has died [pid 24512, exit code -6, cmd /home/ottelab/crazyswarm/ros_ws/devel/lib/crazyswarm/crazyswarm_server __name:=crazyswarm_server __log:=/home/ottelab/.ros/log/03bada0c-25da-11eb-8272-9cefd5fcd5b4/crazyswarm_server-2.log].
log file: /home/ottelab/.ros/log/03bada0c-25da-11eb-8272-9cefd5fcd5b4/crazyswarm_server-2
.log

Actually, one time, I could run without any errors and when I hit the start button in joystick, it did takeoff. But I'm not able to do that again. I end up with above output. I do kill the crazyswarn_server and all other nodes before every run.

My crazyflies.yaml is as follows
crazyflies:

  • channel: 100
    id: 1
    initialPosition: [0.0, 0.0, 0.0]
    type: default

allCrazyflies.yaml is as follows:
crazyflies:

  • id: 1
    channel: 100
    initialPosition: [0.0, 0.0, 0.0]
    type: default

hower_swarm.launch is as follows:
Screenshot from 2020-11-13 13-09-53

My crazyflie name in vicon is cf1 and tracking is enabled in vicon. Because I'm using 'motionCapture', I believe I need not set the markers position or anything in this mode. Please let me know why I'm facing the Eigen Assertion error mentioned above. As I was able to fly once and I can see cf1 parameters being loaded, I'm assuming the communication between vicon and my ROS system is established.

@whoenig
Copy link
Contributor

whoenig commented Nov 13, 2020

  1. I don't think you have to worry about that if the compilation works. You can always switch to the latest firmware version, too (git checkout master, git pull in the crazyflie-firmware folder).

  2. I have not seen that before. Which OS version and compiler are you using? From the link in the error message it sounds like an incorrect usage of Eigen somewhere in the code.

@jpreiss
Copy link
Collaborator

jpreiss commented Nov 15, 2020

I had this submodule error too under Crazyswarm, but I couldn't reproduce it in a standalone clone of bitcraze/crazyflie-firmware. I don't know what is going on.

@manikamakam
Copy link
Author

@whoenig I am using Ubuntu 16.04 with ROS kinetic. I am getting the eigen value error sometimes, but not always. Now, the crazyflie takes off but doesn't hover, instead it's just crashing. What can be the possible issues for this behaviour?

Also, you mentioned previously, that I can navigate using waypoints. Can you please let me know how to do that? It would help even if you can point me towards an existing tutorial for this. Thanks a lot for the help!

@whoenig
Copy link
Contributor

whoenig commented Nov 23, 2020

Crashes are mostly related to tracking issues. Make sure all firmwares (radio + NRF + STM) were updated. Make sure the coordinate system is correct by moving the drone manually and looking and the stateEstimate.x/y/z logging variables.

Perhaps https://drive.google.com/file/d/15favAyrLLpC_O6nrAp-eIbZijFUMLgwV/view helps? There is an example on slide 9 for a simple script. The function you are looking for is called goTo.

@manikamakam
Copy link
Author

Thank you that helps! I'm trying to do it first in simulation but I have two errors.

If I do
cd ros_ws/src/crazyswarm/scripts/pycrazyswarm/cfsim make
I get the following error:
swig -python -I../../../../../../crazyflie-firmware/src/modules/interface cffirmware.i setup.py build_ext --inplace make: setup.py: Command not found Makefile:6: recipe for target 'swig' failed make: *** [swig] Error 127
And if I do
cd ros_ws/src/crazyswarm/scripts python figure8_csv.py --sim
I get following error:
Traceback (most recent call last): File "figure8_csv.py", line 9, in <module> swarm = Crazyswarm() File "/home/ottelab/crazyswarm/ros_ws/src/crazyswarm/scripts/pycrazyswarm/crazyswarm.py", line 39, in __init__ from .crazyflieSim import TimeHelper, CrazyflieServer File "/home/ottelab/crazyswarm/ros_ws/src/crazyswarm/scripts/pycrazyswarm/crazyflieSim.py", line 7, in <module> from .cfsim import cffirmware as firm File "/home/ottelab/crazyswarm/ros_ws/src/crazyswarm/scripts/pycrazyswarm/cfsim/cffirmware.py", line 28, in <module> _cffirmware = swig_import_helper() File "/home/ottelab/crazyswarm/ros_ws/src/crazyswarm/scripts/pycrazyswarm/cfsim/cffirmware.py", line 20, in swig_import_helper import _cffirmware ImportError: No module named _cffirmware
I refrred to https://github.com/USC-ACTLab/crazyswarm/issues/47 and https://github.com/USC-ACTLab/crazyswarm/issues/95 but nothing worked. There is no crazyswarm-next branch in crazyflie-firmware.

@jpreiss
Copy link
Collaborator

jpreiss commented Nov 23, 2020

We have now added mixed python 2/3 support so you must specify the environment variable: CSW_PYTHON=python2 make

@manikamakam
Copy link
Author

manikamakam commented Dec 2, 2020

Thanks for he help!

I observe the crazyflie crashing with both motionCapture and libobjecttracker modes. With motioncapture, after the crazyflie takes off, I get a warning saying that "No pose updated" and with libobjecttracker, it says "ICP did not converge" and "[pcl::IterativeClosestPoint::computeTransformation] Not enough correspondences found. Relax your threshold parameters."

I have seen in one of the forums that "libobjecttrcaker" is preferred. If so, can you address the error mentioned above. If not, can you give some suggestions on how to fix the motioncapture error?

I have ensured that NRF+STM+radio are all updated. The coordinate system matches with the VICON. And I also updated the marker positions in crazyflieTypes.yaml for libobjecttracker mode. Tracking is enabled for motioncapture and disabled for libobjecttracker.

@MauroPfister
Copy link
Contributor

MauroPfister commented Dec 11, 2020

I had this submodule error too under Crazyswarm, but I couldn't reproduce it in a standalone clone of bitcraze/crazyflie-firmware. I don't know what is going on.

TL;DR
Update your Git version (using Git PPA) if you are on Ubuntu 16.04.

We could reproduce the same problem on Ubuntu 16.04 but not on Ubuntu 18.04. Turns out that it is an issue related to the Git version. Ubuntu 16.04 ships with Git 2.7 while Ubuntu 18.04 has Git 2.17. As far as I understand the behavior of git submodule update --depth slightly changed after Git 2.8 making it possible to fetch a commit that previous to Git 2.8 could not be accessed (see https://stackoverflow.com/a/17692710). After updating the Git version to the newest one available from the Git PPA, everything is working as expected.

@jpreiss If you can confirm this it might be worth adding a note to the documentation or pinning an issue so people find it easily. Also, sorry for being slightly off-topic here.

@whoenig
Copy link
Contributor

whoenig commented Dec 13, 2020

@MauroPfister Thanks for the fix! Yes, adding that to the documentation might help many other people who are using the Crazyswarm on 16.04.

@manikamakam The errors you mention indicate that the tracking didn't work. Usually the key question is if the tracking issues occur before or after the crash. One thing to note is that if you operate right at the limit of your mocap (e.g., markers too small, cameras far away etc.) tracking can be very difficult. The best solution in that case is to use single-marker-mode (with libobjecttracker) and put a single, larger marker on top. Make sure that whatever marker you use, that the marker appears at least as 3 pixels on each relevant motion capture camera. Also can you confirm that you verified the tracking and communication by logging stateEstimate.x/y/z?

@ZimingR
Copy link

ZimingR commented Aug 11, 2021

Dear @whoenig,

I am trying to run a python script to control 4 crazyflies. When I `roslaunch crazyflie_demo a_multi_position1119.launch‘, I encountered the same problem: ’Exception thrown while processing service call: timeout
Service call failed: service [/add_crazyflie] responded with an error: timeout‘
In fact, I can connect to crazyflies through cfclient. When I try to run this script on collegue's system, it succeeded. Any suggestions to solve this issue would be greatly appreciated. Thank you very much!

@whoenig
Copy link
Contributor

whoenig commented Aug 11, 2021

@ZimingR Please open a new discussion topic for your problem. When you do, make sure you include your crazyflies.yaml, as well as the URI (rate, address, channel) of your Crazyflies.

@ZimingR
Copy link

ZimingR commented Aug 13, 2021

Thanks a lot!

@hit-JB
Copy link

hit-JB commented Dec 6, 2021

@ZimingR Have you solved the problem that the service throws exception "time out" when launch the razyflie_demo multi_teleop_xbox360.launch file

@ZimingR
Copy link

ZimingR commented Dec 6, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants