{"action":"created","issue":{"url":"https://api.github.com/repos/mavlink/mavros/issues/475","repository_url":"https://api.github.com/repos/mavlink/mavros","labels_url":"https://api.github.com/repos/mavlink/mavros/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/mavlink/mavros/issues/475/comments","events_url":"https://api.github.com/repos/mavlink/mavros/issues/475/events","html_url":"https://github.com/mavlink/mavros/issues/475","id":127358605,"number":475,"title":"By using vision_pose, how can I stop local_position/local from updating using other sensors?","user":{"login":"harewei","id":9687392,"avatar_url":"https://avatars.githubusercontent.com/u/9687392?v=3","gravatar_id":"","url":"https://api.github.com/users/harewei","html_url":"https://github.com/harewei","followers_url":"https://api.github.com/users/harewei/followers","following_url":"https://api.github.com/users/harewei/following{/other_user}","gists_url":"https://api.github.com/users/harewei/gists{/gist_id}","starred_url":"https://api.github.com/users/harewei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harewei/subscriptions","organizations_url":"https://api.github.com/users/harewei/orgs","repos_url":"https://api.github.com/users/harewei/repos","events_url":"https://api.github.com/users/harewei/events{/privacy}","received_events_url":"https://api.github.com/users/harewei/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mavlink/mavros/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-19T03:29:31Z","updated_at":"2016-02-09T03:35:53Z","closed_at":null,"body":"Hello\r\n\r\nCurrently I'm using OFFBOARD mode in gazebo simulator for position control.  With mavros/setpoint_position/local, I can control the position of the vehicle.  Now, I'm publishing to the topic mavros/vision_pose/pose in http://wiki.ros.org/mavros_extras#vision_pose_estimate as follows\r\n```\r\nros::Publisher vision_pos_pub = nh.advertise<geometry_msgs::PoseStamped>(\"mavros/vision_pose/pose\", 10);\r\ngeometry_msgs::PoseStamped fake_pose;\r\nfake_pose.pose.position.x = 0;\r\nfake_pose.pose.position.y = 0;\r\nfake_pose.pose.position.z = 2;\r\nvision_pos_pub.publish(fake_pose);\r\n```\r\nThe mavros node does not give any error or confirmation, so I tried to echo the topic mavros/local_position/local, but the positions do not match the values I publish through vision_pose.  Is this because the vehicle's local position is bound to the gazebo simulated world, or does vision_pose not suppose to change its local position?\r\n\r\nI'm doing this simulation because later on, I wish to implement a vision system on the copter for indoor movements.\r\n\r\nI've read on http://dev.px4.io/external-position.html that I need to set two parameters for enabling external pose input, which I have not done so because I don't know how to do it through mavros code.  If this is the problem, can someone tell me how to?\r\n\r\nThank you.\r\n\r\nEDIT:\r\nI forgot to give the header\r\n```\r\nfake_pose.header.stamp = ros::Time::now();\r\n```\r\nmavros/local_position/local does indeed to be changing to my values in vision_pose, but it keeps decreasing.  To illustrate, my vehicle is at (0,0,0) and vision_pose is set as (5,0,2)\r\nwhen I display its local pose, I get\r\n```\r\nheader: \r\n  seq: 194815\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 101720448\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.94869422913\r\n    y: 0.0107232546434\r\n    z: 1.99170863628\r\n  orientation: \r\n    x: 0.249517752963\r\n    y: -0.0471021631409\r\n    z: 0.769283859966\r\n    w: 0.586280325424\r\n---\r\nheader: \r\n  seq: 194816\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 139778560\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.85067892075\r\n    y: 0.028346111998\r\n    z: 1.9479521513\r\n  orientation: \r\n    x: 0.248702027537\r\n    y: -0.0481760988165\r\n    z: 0.768570199812\r\n    w: 0.587474436008\r\n---\r\nheader: \r\n  seq: 194817\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 163778560\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.78933334351\r\n    y: 0.0373524688184\r\n    z: 1.91836643219\r\n  orientation: \r\n    x: 0.247990310631\r\n    y: -0.0491599409153\r\n    z: 0.767841426681\r\n    w: 0.588645606044\r\n---\r\nheader: \r\n  seq: 194818\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 200778560\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.6962518692\r\n    y: 0.0478611886501\r\n    z: 1.87021708488\r\n  orientation: \r\n    x: 0.247225511053\r\n    y: -0.0502318565973\r\n    z: 0.767075588609\r\n    w: 0.589874010809\r\n---\r\nheader: \r\n  seq: 194819\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 236819264\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.60733270645\r\n    y: 0.0542828068137\r\n    z: 1.8201829195\r\n  orientation: \r\n    x: 0.246439027416\r\n    y: -0.0514939958984\r\n    z: 0.766174850136\r\n    w: 0.591263285832\r\n---\r\nheader: \r\n  seq: 194820\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 261819264\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.55269241333\r\n    y: 0.0620739646256\r\n    z: 1.78350627422\r\n  orientation: \r\n    x: 0.245725932793\r\n    y: -0.0525117074863\r\n    z: 0.765410010886\r\n    w: 0.592459957942\r\n---\r\nheader: \r\n  seq: 194821\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 301819264\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.47959661484\r\n    y: 0.0804646536708\r\n    z: 1.722458601\r\n  orientation: \r\n    x: 0.244938254219\r\n    y: -0.0535362235845\r\n    z: 0.764486714988\r\n    w: 0.59388482637\r\n---\r\nheader: \r\n  seq: 194822\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 338705856\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.41278362274\r\n    y: 0.0943420231342\r\n    z: 1.66188287735\r\n  orientation: \r\n    x: 0.244185470509\r\n    y: -0.0544645704199\r\n    z: 0.763681147387\r\n    w: 0.595145504635\r\n---\r\nheader: \r\n  seq: 194823\r\n  stamp: \r\n    secs: 1453174737\r\n    nsecs: 374705856\r\n  frame_id: fcu\r\npose: \r\n  position: \r\n    x: 4.35053110123\r\n    y: 0.104449227452\r\n    z: 1.6009837389\r\n  orientation: \r\n    x: 0.243456628131\r\n    y: -0.0553405131374\r\n    z: 0.762860215571\r\n    w: 0.596414779598\r\n```\r\nSo basically it keeps decreasing then returns to (5,0,2) again.  I'm guessing this is because the vehicle is at (0,0,0) in the simulated world.  How can I stop this from happening by suppressing it?\r\n\r\nUPDATE:\r\nI tried it on a real copter, the x and y value work as expected, but even though the z value changes for a split second, it returns to the real world value very quickly.  This is possibly due to z being updated by barometer or something.  So the question remains the same, how can I disable all xyz value updates by the copter and only accept those from vision_pose_estimate?\r\n\r\nUPDATE 2:\r\nI've found that I have to edit the INAV parameters.  However, whether I follow the parameters in https://github.com/AutoModality/vis_pose_test/issues/2 , or by setting all INAV parameters in https://pixhawk.org/firmware/parameters#position_estimator_inav to 0 except those involving vision, the local position published are still doing weird things in gazebo simulator.  It would be great if someone can give me their parameter settings in order to tell the vehicle's position purely based on vision estimate."},"comment":{"url":"https://api.github.com/repos/mavlink/mavros/issues/comments/181690912","html_url":"https://github.com/mavlink/mavros/issues/475#issuecomment-181690912","issue_url":"https://api.github.com/repos/mavlink/mavros/issues/475","id":181690912,"user":{"login":"gokoreas","id":5248102,"avatar_url":"https://avatars.githubusercontent.com/u/5248102?v=3","gravatar_id":"","url":"https://api.github.com/users/gokoreas","html_url":"https://github.com/gokoreas","followers_url":"https://api.github.com/users/gokoreas/followers","following_url":"https://api.github.com/users/gokoreas/following{/other_user}","gists_url":"https://api.github.com/users/gokoreas/gists{/gist_id}","starred_url":"https://api.github.com/users/gokoreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gokoreas/subscriptions","organizations_url":"https://api.github.com/users/gokoreas/orgs","repos_url":"https://api.github.com/users/gokoreas/repos","events_url":"https://api.github.com/users/gokoreas/events{/privacy}","received_events_url":"https://api.github.com/users/gokoreas/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T03:35:53Z","updated_at":"2016-02-09T03:35:53Z","body":"I guess in the gazebo simulation, you are not giving any visual feedback(e.g. cameras) for the position estimator to have reference\r\n\r\nYou should publish the proper vision data so the vision estimate can have a proper estimate in position"}}