Issues with Running ROS Services[/cf1/takeoff] on command line #440
Replies: 2 comments 1 reply
-
I never used I can only suggest going the normal software debugging route. Since you get the |
Beta Was this translation helpful? Give feedback.
-
I believe the problem is the third parameter (duration): this is not a simple number, but a composite type (secs/nsecs), see http://wiki.ros.org/msg. Thus, you'll need to construct it using the YAML syntax instead, see https://wiki.ros.org/ROS/YAMLCommandLine. |
Beta Was this translation helpful? Give feedback.
-
Thank you in advance,
I have the Crazyflie 2.1 and I am using Ubuntu 20.04 VM. I am using the flow deck with crazyswarm.
When I run hover_swarm I am able to successfully takeoff using the start button on the Xbox controller as well as land using the back button. However, I am not bale to successfully use the ros services via the command line.
When I enter the command:
rosservice call /cf1/takeoff 0 .5 3
the crazyflie does nothing. However the command line shows:
[cf1] Takeoff
just like it does when I use the Xbox controller and hit the start button. Just not getting any movement at all by the Crazyflie.
I am wondering if I am missing something.
The log from the command line is shown below:
roslaunch crazyswarm hover_swarm.launch
... logging to /home/bitcraze/.ros/log/94fb56e8-ef0d-11eb-8a7d-25f561d364cb/roslaunch-ubuntu-7821.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://ubuntu:33629/
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 [7836]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 94fb56e8-ef0d-11eb-8a7d-25f561d364cb
process[rosout-1]: started with pid [7851]
started core service [/rosout]
process[crazyswarm_server-2]: started with pid [7858]
process[joy-3]: started with pid [7859]
process[crazyswarm_teleop-4]: started with pid [7860]
process[rviz-5]: started with pid [7861]
[ INFO] [1627412719.408148218]: Wait for services...
[ INFO] [1627412719.409320783]: waitForService: Service [/emergency] has not been advertised, waiting...
[ WARN] [1627412719.419132161]: Couldn't set gain on joystick force feedback: Bad file descriptor
[ INFO] [1627412719.420516095]: Opened joystick: /dev/input/js2 (Microsoft X-Box One pad). deadzone_: 0.050000.
[ INFO] [1627412719.430164868]: waitForService: Service [/emergency] is now available.
[ INFO] [1627412719.431456666]: Manager ready.
ch: 1
[ INFO] [1627412719.525961971]: Adding CF: cf1 (radio://0/100/2M/E7E7E7E701, cf1)...
[ INFO] [1627412719.586673562]: CF ctor: 0.060008 s
[ INFO] [1627412719.619292353]: [cf1] SYS: ----------------------------
[ INFO] [1627412719.642727362]: [cf1] SYS: Crazyflie 2.1 is up and running!
[ INFO] [1627412719.665350493]: [cf1] SYS: Build 11:0864ef92245a (2021.03 +11) CLEAN
[ INFO] [1627412719.700941520]: [cf1] SYS: I am 0x20383347344D50080030004D and I have 1024KB of flash!
[ INFO] [1627412719.711080614]: [cf1] CFGBLK: v1, verification [OK]
[ INFO] [1627412719.725537028]: [cf1] DECK_CORE: 2 deck(s) found
[ INFO] [1627412719.747111883]: [cf1] DECK_CORE: Calling INIT on driver bcFlow2 for deck 0
[ INFO] [1627412719.758969473]: [cf1] ZR2: Z-down sensor [OK]
[ INFO] [1627412719.780328371]: [cf1] PMW: Motion chip id: 0x49:0xB6
[ INFO] [1627412719.800788133]: [cf1] DECK_CORE: Calling INIT on driver bcMultiranger for deck 1
[ INFO] [1627412719.824223347]: [cf1] IMU: BMI088: Using I2C interface.
[ INFO] [1627412719.846678041]: [cf1] IMU: BMI088 Gyro connection [OK].
[ INFO] [1627412719.868173797]: [cf1] IMU: BMI088 Accel connection [OK]
[ INFO] [1627412719.891523323]: [cf1] IMU: BMP388 I2C connection [OK]
[ INFO] [1627412719.912070839]: [cf1] ESTIMATOR: Using Kalman (2) estimator
[ INFO] [1627412719.934496389]: [cf1] CONTROLLER: Using PID (1) controller
[ INFO] [1627412719.955997220]: [cf1] MTR-DRV: Using brushed motor driver
[ INFO] [1627412719.966662847]: [cf1] EEPROM: I2C connection [OK].
[ INFO] [1627412719.980075114]: [cf1] STORAGE: Storage check [OK].
[ INFO] [1627412720.003235721]: [cf1] IMU: BMI088 gyro self-test [OK]
[ INFO] [1627412720.025421255]: [cf1] MR: Init front sensor [OK]
[ INFO] [1627412720.035983991]: [cf1] MR: Init back sensor [OK]
[ INFO] [1627412720.044877372]: [cf1] MR: Init up sensor [OK]
[ INFO] [1627412720.056478111]: [cf1] MR: Init left sensor [OK]
[ INFO] [1627412720.067241679]: [cf1] MR: Init right sensor [OK]
[ INFO] [1627412720.079011359]: [cf1] DECK_CORE: Deck 1 test [OK].
[ INFO] [1627412720.099468347]: [cf1] ion...
[ INFO] [1627412720.111175007]: [cf1] SYS: Free heap: 16352 bytes
[ INFO] [1627412720.123850852]: [cf1] STAB: Ready to fly.
[ INFO] [1627412720.142485970]: [cf1] ESTKALMAN: State out of bounds, resetting
[ INFO] [1627412720.168779151]: [cf1] Requesting parameters...
[ INFO] [1627412720.581961298]: Found variables in cache.
[ INFO] [1627412723.304284155]: [cf1] reqParamTOC: 3.717500 s (229 params)
[ INFO] [1627412723.304308593]: [cf1] Requesting logging variables...
[ INFO] [1627412723.335197734]: Found variables in cache.
[ INFO] [1627412723.335792025]: [cf1] reqLogTOC: 0.031513 s
[ INFO] [1627412723.401672969]: [cf1] logBlocks: 3.717500 s
[ INFO] [1627412723.476561380]: Requesting memories...
[ INFO] [1627412723.573817616]: Memories: 6
[ INFO] [1627412723.867998171]: [cf1] Ready. Elapsed: 4.281203 s
[ INFO] [1627412723.868034145]: CF run: 4.281370 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 2
update ctrlMel/kR_xy to 50000
update ctrlMel/kR_z to 60000
update ctrlMel/kd_omega_rp to 200
update ctrlMel/kd_xy to 1
update ctrlMel/kd_z to 1
update ctrlMel/ki_m_z to 500
update ctrlMel/ki_xy to 0.1
update ctrlMel/ki_z to 0.5
update ctrlMel/kp_xy to 2
update ctrlMel/kp_z to 3
update ctrlMel/kw_xy to 16000
update ctrlMel/kw_z to 12000
update ctrlMel/mass to 0.11
update ctrlMel/massThrust to 23000
[ INFO] [1627412723.880822417]: [cf1] Update parameters
[ INFO] [1627412724.527607017]: [cf1] CONTROLLER: Using Mellinger (2) controller
[ INFO] [1627412724.943110810]: Update params: 1.075039 s
[ INFO] [1627412724.943432905]: Started 1 threads
[ INFO] [1627412734.115047933]: [cf1] Takeoff
Beta Was this translation helpful? Give feedback.
All reactions