Hello,
I am using gazebo for SITL, I would like to have the local position of the quad in gazebo in real time.
By reading the SDK, I thought about using the position_velocity_ned_async() in order to recover this values
in real time.
During the test I printed the position from the /gazebo/dafault/pose/info in a terminal, and launched my code
in a different one, the x, y values where very different from the ones printed by gazebo.
For example, here are the Y values or the East in position ned of 3 quadcopters recoverd from the SDK function:
0.55581
0.716298
0.548354
0.555076
0.715983
0.548088
0.553975
0.715908
0.547941
0.554683
0.715726
0.548069
0.555382
0.716241
0.548653
0.555123
0.71639
0.548989
0.554848
0.716364
0.549448
0.554562
0.716297
0.54925
0.554249
0.715924
0.549104
0.554444
0.715926
0.549401
0.554698
0.716091
And here are the position information recovered by gazebo pose/info topic:
time { sec: 1398 nsec: 962000000 } pose { name: "iris_1" id: 42 position { x: 3.599438443085119 y: 0.35564963712424574 z: 0.1044579829735158 } orientation { x: -0.00043751701823432394 y: 0.0007984126010138733 z: 0.5434604435386261 w: 0.83943428416105159 } } pose { name: "iris_1::base_link" id: 43 position { x: 0 y: 0 z: 0 } orientation {
x: 0 y: 0 z: 0 w: 1 } } pose { name: "iris_1::/imu_link" id: 48 position { x: -1.999199784128076e-09 y: -3.5128961117295867e-09 z: 8.7308655252091786e-09 } orientation {
x: 1.6910008803915251e-09 y: -9.7351125302345617e-09 z: -4.81256867690405e-10 w: 1 } } pose { name: "iris_1::rotor_0" id: 49 position { x: 0.12999999712605945 y: -0.22000000387402513 z: 0.023000008422416351 } orientation { x: 1.6159322251420012e-06 y: -4.6211187750413519e-06 z: 0.66817297167299439 w: -0.7440059676519496 } } pose { name: "iris_1::rotor_1" id: 54 position { x: -0.13000000256107108 y: 0.19999999663095169 z: 0.0230000079041404 } orientation { x: -1.7971821553150891e-06 y: 1.5941229982065075e-05 z: -0.856809632107163 w: 0.51563286752401194 } } pose { name: "iris_1::rotor_2" id: 59 position { x: 0.12999999703937068 y: 0.21999999629785763 z: 0.023000013912385868 } orientation { x: 1.9334953841083241e-07 y: -1.0887737659605388e-06 z: 0.98073617956487258 w: -0.19533700645621482 } } pose { name: "iris_1::rotor_3" id: 64 position {
x: -0.13000000350505447 y: -0.20000000356522057 z: 0.023000004047376937 } orientation { x: -1.1190149783297748e-06 y: -9.0486869859667538e-07 z: -0.80149946618558154 w: -0.59799548970051331 } } pose { name: "iris" id: 15 position { x: 3.7341541676558219 y: 3.5606459450314354 z: 0.10451233993591215 } orientation { x: -0.00038581070191812431 y: -0.00043472023526426861 z: 0.54999490953556307 w: 0.8351678044880485 } } pose { name: "iris::base_link" id: 16 position { x: 0 y: 0 z: 0 } orientation { x: 0 y: 0 z: 0 w: 1 } } pose { name: "iris::/imu_link" id: 21 position { x: -2.1157448614582017e-09 y: -3.6891263685876832e-09 z: 9.7225008668260342e-09 } orientation { x: 1.1172326514451159e-09 y: -1.604098516484135e-08 z: -5.4329751808523952e-10 w: 1 } } pose { name: "iris::rotor_0" id: 22 position { x: 0.1299999969273257 y: -0.22000000411098974 z: 0.023000009354274084 } orientation { x: 7.65151828411789e-06 y: -3.2198511895103819e-05 z: -0.99444937944464762 w: 0.1052161139125822 } } pose { name: "iris::rotor_1" id: 27 position { x: -0.13000000272561052 y: 0.19999999641778984 z: 0.023000008834674367 } orientation { x: -1.5038329751504731e-06 y: 5.2570497162600274e-06 z: -0.69013899063416728 w: 0.72367684333309623 } } pose { name: "iris::rotor_2" id: 32 position { x: 0.129999996921997 y: 0.2199999961564838 z: 0.023000014758987847 } orientation { x:
1.6621351113754687e-06 y: -3.1869275770567888e-06 z: 0.6370804259353926 w: -0.77079733450308419 } } pose { name: "iris::rotor_3" id: 37 position { x: -0.13000000361385461 y: -0.20000000374356067 z: 0.023000004918563206 } orientation { x: -1.3045417959954727e-05 y: -4.0787006149755646e-06 z: -0.17051608519809597 w: 0.9853548926665443 } } pose { name: "iris_2" id: 69 position { x: 0.5827067722833067 y: 3.3437887435362441 z: 0.10455721843038902 } orientation { x: -0.00051925538510161 y: -0.00035073747009964487 z: 0.54712128981192221 w: 0.83705310559821167 } } pose { name: "iris_2::base_link" id: 70 position { x: 0 y: 0 z: 0 } orientation { x: 0 y: 0 z: 0 w: 1 } } pose { name: "iris_2::/imu_link" id: 75 position { x: -2.110367831949147e-09 y: -3.6234917724589434e-09 z: 9.7089796654184568e-09 } orientation { x: 5.0042395899861647e-11 y: -1.7095886210643455e-08 z: -5.1664172939780428e-10 w: 1 } } pose { name: "iris_2::rotor_0" id: 76 position { x: 0.12999999670459123 y: -0.22000000403158743 z: 0.023000010758412071 } orientation { x: 1.4662043906815059e-06 y: -6.6476753721339548e-06 z: -0.94062020994260576 w: -0.33946077917954942 } } pose { name: "iris_2::rotor_1" id: 81 position { x: -0.13000000290752423 y: 0.19999999640535734 z: 0.023000008444018543 } orientation { x: -5.590388300320315e-06 y: 1.8065633792531336e-05 z: 0.99638305337661393 w: 0.084975352816426139 } } pose { name: "iris_2::rotor_2" id: 86 position { x: 0.1299999969262238 y: 0.21999999625409336 z: 0.023000014433517534 } orientation { x: -5.971157891542032e-06 y: 3.4379820091289993e-05 z: -0.95127967223876331 w: 0.30832934334520351 } } pose { name: "iris_2::rotor_3" id: 91 position { x: -0.13000000360139588 y: -0.2000000036868258 z: 0.023000004890296959 } orientation { x: 3.9243829361632859e-06 y: 1.6417131934893254e-07 z: 0.42278070974728721 w: -0.90623201855272828 }
Sorry for gazebo output,
So the question is Why they are different?? Am I missing something??
Best regards,