Change home position in Voxl-mapper



  • Hello,
    I would like to send the coordinates for PLAN TO POINT in Voxl-Mapper rather than selecting in the map. While going through the codes I found this line where the goal_pose is being updated.
    So can I use a python script to send goal_pose and when I click PLAN TO POINT, it plans a path to that point?
    For this where should I place the python file? How can I find the voxl-mapper package inside voxl?


  • Dev Team

    Hey @howard,

    The line you linked to is within the control pipe callback function that is setup for exactly this purpose. From within a C/C++ application, you can use the pipe_client_send_control_cmd function to write a command in this format:

    plan_to: x_coord y_coord
    (where z_coord is taken as your current height, and coords are doubles).

    From within a python script or bash on voxl, you can simply echo/write to the control pipe yourself using the same syntax (and the pipe will be /run/mpa/plan_msgs/control).



  • Oh okay, That was helpful ,Thank you🙂



  • Hey,
    So today I tried sending x and y coordinates as mentioned above, we could see the path on voxl portal and the trajectory was sent to voxl vison px4 , however when we switched to offboard mode and pressed follow button, the vehicle didn't follow the path instead it yawed by some angle and went a little forward. What could be the issue?
    Thanks!!


  • Dev Team

    @howard what offboard mode do you have set currently? It sounds like you may still be in figure eight mode.



  • @Matthew-Booker No , I have changed it to trajectory


  • Dev Team

    Try changing the loco_scale_time parameter to false in the /etc/modalai/voxl-mapper.conf



  • @Matthew-Booker sure, will do that. Can you please elaborate a little on loco_scale_time parameter ? what does that parameter do?
    Thank you


  • Dev Team

    The parameter scales the segment times evenly to ensure that the trajectory is feasible given the provided max velocity and max acceleration. It does not change the shape of the trajectory and only increases segment times. I believe that in your version of voxl-mapper we did not expose the parameters for max velocity and max acceleration.

    In my recent testing I saw some cases where the trajectory length would be upwards of 3 minutes long despite the distance being extremely small. Changing this parameter prevents that. I have yet to look into the cause of this issue



  • Hey, Thank you , that worked really well.

    1. Where can we find the 'voxl_mapper.cc' script in the filesystem of voxl?
    2. We are interested to provide a 3d goal point rather than only providing goal x,y coordinates with z fixed. Will point to point navigation work if a 3d goal point is provided (i.e. providing x,y and z coordinates rather than only giving x and y coordinates with a constant z) with the current package?

  • Dev Team

    1. https://gitlab.com/voxl-public/voxl-sdk/services/voxl-mapper - Here is the link to the publicly available repo. The voxl_mapper.cc file is under the server/voxl-mapper folder. On the voxl the file voxl_mapper.cc doesn't exist since its all packaged up into a single IPK file.

    2. The planner sets the z coordinate of the goal to the current height so you would have to change it in this line https://gitlab.com/voxl-public/voxl-sdk/services/voxl-mapper/-/blob/master/server/voxl-mapper/voxl_mapper.cc#L1001


Log in to reply