Forums - No translation information from snapdragon_navigator C++ library

4 posts / 0 new
Last post
No translation information from snapdragon_navigator C++ library
koumis
Join Date: 21 Sep 17
Posts: 11
Posted: Tue, 2017-10-03 13:28
I am trying to use the Snapdragon Navigator C++ API through snav_ros, the ROS interface.
 
The rotation information is populated correctly in the "pose" topic, but there is no translation information (x, y, and z remain at 0.0).
 
The ROS interface gets this information from "SnavCachedData.pos_vel.position_estimated" (SnavCachedData is built into the Navigator API and is populated upon calling sn_update_data()).
 
This is strange because I can get both rotation and translation information by running the vislam code here:
 
Any ideas on how to debug this?
 
Thanks,
Alexander
 
  • Up0
  • Down0
jackdoc Moderator
Join Date: 14 Nov 16
Posts: 29
Posted: Tue, 2017-10-10 08:30

Hi Alexander,

My guess is that the Snapdragon Navigator VIO app is not running. Can you try running the following command? This will configure Snapdragon Navigator to use VIO (assuming you are using a downward-looking camera):

/etc/snav/configure_vio.sh -c downward

This is a one-time command that should be run after the Snapdragon Navigator package is installed if VIO functionality is desired.

If that does not work, can you send some output from snav_inspector? The "data_status" and "update_rates" groups would be helpful to see. Also, once you confirm that VIO data is being received by Snapdragon Navigator, you can check out the estimated position and velocity in the "pos_vel" group.

  • Up0
  • Down0
koumis
Join Date: 21 Sep 17
Posts: 11
Posted: Tue, 2017-10-10 14:33

Thanks for the reply. I had run configure_vio -c downward previously (and did so again just to be sure). Here is output from snav_inspector:

 5 data_status:
    time: 894067818
    loop_cntr: 13826
    imu_0_status: SN_DATA_VALID
    baro_0_status: SN_DATA_VALID
    esc_feedback_status: SN_DATA_VALID
    mag_0_status: SN_DATA_NOT_INITIALIZED
    gps_0_status: SN_DATA_NOT_INITIALIZED
    sonar_0_status: SN_DATA_NOT_INITIALIZED
    optic_flow_0_status: SN_DATA_NOT_INITIALIZED
    spektrum_rc_0_status: SN_DATA_NOT_INITIALIZED
    api_rc_status: SN_DATA_NOT_INITIALIZED
    rc_active_status: SN_DATA_NOT_INITIALIZED
    height_estimator_status: SN_DATA_VALID
    attitude_estimator_status: SN_DATA_VALID
 6 update_rates:
    time: 1000016394
    loop_cntr: 66800
    control_loop_freq: 499.35
    imu0_freq: 499.903
    imu1_freq: 0
    imu2_freq: 0
    baro0_freq: 50.0004
    mag0_freq: 0
    sonar0_freq: 0
    rc0_freq: 0
    esc_fb_freq: 499.347
    gnss0_freq: 0
    gnss1_freq: 0
 
If I gather data from vio_pos_vel instead of pos_vel, I get translation data that seems adequate. In the snav_ros Github project, there was a commit that updated the ROS code to use pos_vel instead of vio_pos_vel when upgrading the code to work for Navigator 1.2.38.1 from 1.2.31. Maybe there was a regression that broke pos_vel. See more about this issue here:
 
 
I am running firmware Flight_3.1.3.1, Navigator SDK 1.2.38.1, and Machine Vision SDK 1.0.2.
 
  • Up0
  • Down0
jackdoc Moderator
Join Date: 14 Nov 16
Posts: 29
Posted: Wed, 2017-10-11 14:44

Hi Alexander,

Thanks for providing these additional details.

Can you try connecting an RC, putting the vehicle into SN_POS_HOLD_MODE (see "current_mode" in the "general_status" group of snav_inspector), and checking to see if the pos_vel fields are populated? In Snapdragon Navigator v1.2.38.1 and earlier, the estimated position and related fields in pos_vel are only updated in certain modes.

This issue will be addressed in a future Snapdragon Navigator release. In future releases, the behavior should match your expectations: the pos_vel fields are populated as long as VIO data is being received by the flight stack, regardless of the current mode.

For your use case, getting the data from vio_pos_vel should be fine.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.