Closed Doodle1106 closed 5 years ago
Ẁhat config did you set for fake_gps
in px4_config.yaml
?
@TSC21
Thanks for your replay, I've updated my description.
Cheers HR
what's the output of rostopic echo /mavros/fake_gps/vision
?
@TSC21
I got reponse from /mavros/global_postion/global after several restarts but the lat and long value are still Zurich default value rather than my modified lat and long.
The output of /mavros/fake_gps/vision has the exact same value as what I published to it; while the output of /mavros/global_postion/global is :
header:
seq: 303
stamp:
secs: 1538300528
nsecs: 145340672
frame_id: "base_link"
status:
status: 0
service: 1
latitude: 47.3977608
longitude: 8.5456112
altitude: 545.260900428
position_covariance: [4.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 4.0]
position_covariance_type: 2
although I set what follows in px4_config.yaml
use_mocap: false # ~mocap/pose
mocap_transform: false # ~mocap/tf instead of pose
use_vision: true # ~vision (pose)
geo_origin:
lat: 40.028907 # latitude [degrees]
lon: 116.30301 # longitude [degrees]
alt: 35.05 # altitude (height over the WGS-84 ellipsoid) [meters]
eph: 2.0
epv: 2.0
the output of /mavros/global_position/local and /mavros/local_position/pose are similar and are roughly zero:
seq: 24455
stamp:
secs: 1538301993
nsecs: 959581248
frame_id: "map"
child_frame_id: "base_link"
pose:
pose:
position:
x: 0.0528472390014
y: 0.0111187947004
z: 0.081
orientation:
x: 0.0214311271929
y: -0.00541117329422
z: -0.515657798546
w: -0.856509477697
covariance: [4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999.0]
the output of /mavros/fake_gps/vision is some arbitary constant value I set:
header:
seq: 0
stamp: 1538302172.676561887
frame_id:
pose:
position:
x: 10
y: 21
z: 12.5
orientation:
x: 0
y: 0
z: 0
w: 0
I am testing above functions in the gazebo simulator but I dont think it has anything to do with the result.
Thanks again for your help. HR
You are using SITL right? Probably you are not aware, but Gazebo publishes GPS data to the flight controller in SITL mode.
thanks, closing the issue.
hi @TSC21 is there a way to somehow get this to work in SITL? I have been trying for couple of days now, but no matter what I do, I cant get this to work?
Hi guys,
I am trying to use fake_gps plugin and I followed below steps:
I tried to inspect the output of /mavros/global_position/global but nothing comes out. Am I doing it right? Do I have to set other parameters? I would really appreciate it if anyone can help me out.
Thanks
MAVROS version and platform
Mavros: ?0.18.4? ROS: ?Kinetic? Ubuntu: ?16.04?
Autopilot type and version
PX4
Version: ?3.7.1?
Node logs
PARAMETERS
NODES / mavros (mavros/mavros_node)
auto-starting new master process[master]: started with pid [7250] ROS_MASTER_URI=http://localhost:11311
setting /run_id to b9e71ad0-c249-11e8-9156-9cb6d0e498fb process[rosout-1]: started with pid [7263] started core service [/rosout] process[mavros-2]: started with pid [7281] [ INFO] [1538048254.769173516]: FCU URL: udp://:14540@127.0.0.1:14557 [ INFO] [1538048254.770981450]: udp0: Bind address: 0.0.0.0:14540 [ INFO] [1538048254.771149091]: udp0: Remote address: 127.0.0.1:14557 [ INFO] [1538048254.771436506]: GCS bridge disabled [ INFO] [1538048254.771467482]: udp0: Remote address: 127.0.0.1:14557 [ INFO] [1538048254.781694980]: Plugin 3dr_radio loaded [ INFO] [1538048254.783643883]: Plugin 3dr_radio initialized [ INFO] [1538048254.783779728]: Plugin actuator_control loaded [ INFO] [1538048254.786801012]: Plugin actuator_control initialized [ INFO] [1538048254.789557615]: Plugin adsb loaded [ INFO] [1538048254.792915199]: Plugin adsb initialized [ INFO] [1538048254.793053316]: Plugin altitude loaded [ INFO] [1538048254.794045116]: Plugin altitude initialized [ INFO] [1538048254.794150398]: Plugin cam_imu_sync loaded [ INFO] [1538048254.794757668]: Plugin cam_imu_sync initialized [ INFO] [1538048254.794891312]: Plugin command loaded [ INFO] [1538048254.801782111]: Plugin command initialized [ INFO] [1538048254.801901633]: Plugin debug_value loaded [ INFO] [1538048254.806290840]: Plugin debug_value initialized [ INFO] [1538048254.806320793]: Plugin distance_sensor blacklisted [ INFO] [1538048254.806450368]: Plugin fake_gps loaded [ INFO] [1538048254.820377220]: Plugin fake_gps initialized [ INFO] [1538048254.820559614]: Plugin ftp loaded [ INFO] [1538048254.828403069]: Plugin ftp initialized [ INFO] [1538048254.828552887]: Plugin global_position loaded [ INFO] [1538048254.844711321]: Plugin global_position initialized [ INFO] [1538048254.844840742]: Plugin gps_rtk loaded [ INFO] [1538048254.847329597]: Plugin gps_rtk initialized [ INFO] [1538048254.847473203]: Plugin hil loaded [ INFO] [1538048254.862093045]: Plugin hil initialized [ INFO] [1538048254.862251493]: Plugin home_position loaded [ INFO] [1538048254.865947755]: Plugin home_position initialized [ INFO] [1538048254.866090139]: Plugin imu loaded [ INFO] [1538048254.874291734]: Plugin imu initialized [ INFO] [1538048254.874430291]: Plugin local_position loaded [ INFO] [1538048254.879899326]: Plugin local_position initialized [ INFO] [1538048254.880031364]: Plugin log_transfer loaded [ INFO] [1538048254.883095952]: Plugin log_transfer initialized [ INFO] [1538048254.883252314]: Plugin manual_control loaded [ INFO] [1538048254.886777005]: Plugin manual_control initialized [ INFO] [1538048254.886905137]: Plugin mocap_pose_estimate loaded [ INFO] [1538048254.890601317]: Plugin mocap_pose_estimate initialized [ INFO] [1538048254.890730737]: Plugin obstacle_distance loaded [ INFO] [1538048254.895091460]: Plugin obstacle_distance initialized [ INFO] [1538048254.895219040]: Plugin odom loaded [ INFO] [1538048254.899180381]: Plugin odom initialized [ INFO] [1538048254.899402095]: Plugin param loaded [ INFO] [1538048254.901945719]: Plugin param initialized [ INFO] [1538048254.902070498]: Plugin px4flow loaded [ INFO] [1538048254.909330714]: Plugin px4flow initialized [ INFO] [1538048254.909362248]: Plugin rangefinder blacklisted [ INFO] [1538048254.909528562]: Plugin rc_io loaded [ INFO] [1538048254.912984014]: Plugin rc_io initialized [ INFO] [1538048254.913014113]: Plugin safety_area blacklisted [ INFO] [1538048254.913145780]: Plugin setpoint_accel loaded [ INFO] [1538048254.916150706]: Plugin setpoint_accel initialized [ INFO] [1538048254.916392169]: Plugin setpoint_attitude loaded [ INFO] [1538048254.927020120]: Plugin setpoint_attitude initialized [ INFO] [1538048254.927175460]: Plugin setpoint_position loaded [ INFO] [1538048254.940853809]: Plugin setpoint_position initialized [ INFO] [1538048254.941006508]: Plugin setpoint_raw loaded [ INFO] [1538048254.949965114]: Plugin setpoint_raw initialized [ INFO] [1538048254.950111001]: Plugin setpoint_velocity loaded [ INFO] [1538048254.956473645]: Plugin setpoint_velocity initialized [ INFO] [1538048254.956752808]: Plugin sys_status loaded [ INFO] [1538048254.967263822]: Plugin sys_status initialized [ INFO] [1538048254.967472350]: Plugin sys_time loaded [ INFO] [1538048254.973645032]: TM: Timesync mode: MAVLINK [ INFO] [1538048254.975090345]: Plugin sys_time initialized [ INFO] [1538048254.975229339]: Plugin trajectory loaded [ INFO] [1538048254.980770266]: Plugin trajectory initialized [ INFO] [1538048254.980915150]: Plugin vfr_hud loaded [ INFO] [1538048254.981455007]: Plugin vfr_hud initialized [ INFO] [1538048254.981474114]: Plugin vibration blacklisted [ INFO] [1538048254.981580130]: Plugin vision_pose_estimate loaded [ INFO] [1538048254.989299353]: Plugin vision_pose_estimate initialized [ INFO] [1538048254.989428903]: Plugin vision_speed_estimate loaded [ INFO] [1538048254.993650347]: Plugin vision_speed_estimate initialized [ INFO] [1538048254.993831189]: Plugin waypoint loaded [ INFO] [1538048254.998359098]: Plugin waypoint initialized [ INFO] [1538048254.998514772]: Plugin wind_estimation loaded [ INFO] [1538048254.999306770]: Plugin wind_estimation initialized [ INFO] [1538048254.999343752]: Autostarting mavlink via USB on PX4 [ INFO] [1538048254.999437470]: Built-in SIMD instructions: SSE, SSE2 [ INFO] [1538048254.999452488]: Built-in MAVLink package version: 2018.8.8 [ INFO] [1538048254.999473436]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta [ INFO] [1538048254.999489878]: MAVROS started. MY ID 1.240, TARGET ID 1.1 [ INFO] [1538048255.006706004]: IMU: High resolution IMU detected! [ INFO] [1538048255.008314463]: IMU: Attitude quaternion IMU detected! [ INFO] [1538048255.543352215]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot [ INFO] [1538048255.549623215]: IMU: High resolution IMU detected! [ INFO] [1538048255.551284165]: IMU: Attitude quaternion IMU detected! [ INFO] [1538048256.547602077]: VER: 1.1: Capabilities 0x000000000000e4ef [ INFO] [1538048256.547690215]: VER: 1.1: Flight software: 01080000 (00000000CE9C90E1) [ INFO] [1538048256.547754200]: VER: 1.1: Middleware software: 01080000 (00000000CE9C90E1) [ INFO] [1538048256.547840030]: VER: 1.1: OS software: 040f00ff (00000000F6F78190) [ INFO] [1538048256.547893797]: VER: 1.1: Board hardware: 00000001 [ INFO] [1538048256.547957728]: VER: 1.1: VID/PID: 0000:0000 [ INFO] [1538048256.548011098]: VER: 1.1: UID: 0000000100000002 [ WARN] [1538048256.548228556]: CMD: Unexpected command 520, result 0 [ INFO] [1538048270.545308198]: WP: mission received
Diagnostics
Check ID
OK. I got messages from 1:1.
Received 6213 messages, from 1 addresses sys:comp list of messages 1:1 0, 1, 2, 4, 140, 141, 147, 24, 26, 30, 31, 32, 33, 74, 76, 87, 230, 105, 111, 241, 242, 245