TOF SLAM
-
I was using a plot branch of voxl-portal and what I believe to be the dev of mapper.
However, I'll just recompile and reinstall both.
-
I'm still having issues generating the path, though now voxl-mapper is not giving me the success messages as before.
Additionally, I've included output from
voxl-mapper
, voxl-inspect-cpu and voxl-inspect-services.
As of now, using the seeker, I've configured voxl-vision-px4.conf and voxl-mapper.conf as specified in the voxl-mapper dev branch readme. Using the voxl-portal I was able to generate this map:
When clicking on 'Plan To a Point', voxl-mapper outputs: Client requested plan to location. I see a green 'Go!' button appear, but no paths. Clicking the button seems to cause the ui to hang briefly, and then return to the original menu items with no effect on the drone.
voxl-mapper simply states Switching to 3D checks.
Any guidance would be greatly appreciated.
-
To view the paths, you will need to switch to the "3D View" tab at the top of the mapping page in voxl-portal before clicking either "Plan to a Point" or "Plan Home". The path rendering has not yet been implemented for the 2D costmap, but you will still be given the option to follow the path from that view.
-
I can sometimes get the paths to load in the 3D view. At least, i got working the first time, but was still unable to fly. Does the drone need to be actively flying with off-board (holding position) enabled, or is it sufficient to be powered on with off-board enabled at the controller?
Subsequent attempts had similar behaviour to what i had before with no indication at the UI/terminal of why the path had not loaded. I need to step away from this for at least the weekend, but I'm definitely stuck.
To be very verbose, my process is to turn the drone on, wait about a minute, then hand carry the drone around the space (about 30 degrees yawed towards walls) doing two passes, one clockwise, one counter clockwise. Sometimes i'll skip the second pass if the 2d map looks good enough. I'll land back at ~0,0,0 then pick a point in the ui, once satisfied with the choice, press the go! button.
I'm thinking the issue may be from selecting a new point after the first one was inadequate. This might be anecdotal, but it feels like any point after the first leads to issues.
Here is my view after a path was not generated after planning to a point (top right). Drone slightly visible in the bottom right.
Unrelated, and perhaps should be another topic, is there a way to view the 3d/2d maps with a different camera control model? IE not the default trackball?
-
@alarm_hq,
It seems like the RRT* portion of the path generation is never converging. Are you able to generate any paths, particularly if the drone is closer?Also, could you paste your current config file (i.e. output of cat /etc/modalai/voxl-mapper.conf)? The rrt_max_runtime_nanoseconds and rrt_use_first_solution parameters may help fix this issue.
-
As for a different camera control model, there are no others implemented now but it would be an easy addition. Is there a specific one you are looking for?
-
I have generated a path, though was unable to have the drone take off. Does the drone have to be in a hover state, or can it take off with the plan?
I don't have a specific preference for the camera control model, other than it's easier to use with a laptop trackpad. If i had to pick one, I'd say flycontrols.
/** * This file contains configuration that's specific to voxl-mapper. */ { "robot_radius": 0.2, "point_skip": 7, "voxel_size": 0.20000000298023224, "voxels_per_side": 16, "esdf_save_path": "/data/voxl_mapper/esdf_map", "tsdf_save_path": "/data/voxl_mapper/tsdf_map", "mesh_save_path": "/data/voxl_mapper/mesh.ply", "esdf_max_distance": 4, "esdf_min_distance": 0.20000000298023224, "esdf_default_distance": 2, "esdf_inner_sphere_radius": 0.20000000298023224, "esdf_outer_sphere_radius": 0.600000023841858, "rrt_min_distance": 0.2, "rrt_max_runtime_nanoseconds": -1, "rrt_use_first_solution": true, "rrt_treat_unknown_as_occupied": true, "rrt_send_tree": false, "loco_num_segments": 12, "loco_derivative_to_optimize": 3, "loco_poly_degree": 12, "loco_smoothness_cost_weight": 0.3, "loco_collision_cost_weight": 12, "loco_waypoint_cost_weight": 0.025, "loco_min_collision_sampling_dist": 0.2, "loco_add_waypoints": true, "loco_scale_time": true, "loco_split_at_collisions": true, "loco_resample_trajectory": true, "loco_verbose": false }
/etc/modalai/voxl-mapper.conf
-
Your parameters look okay, although it may be useful to set the rrt_max_runtime_nanoseconds to something like 5000000000 (5s) for a hard cut-off while generating the paths. Also, unless you are attempting to plan across long distances, you can ease the parameters for the loco smoother, something like this:
"loco_num_segments": 5, "loco_derivative_to_optimize": 3, "loco_poly_degree": 4, "loco_smoothness_cost_weight": 2.5, "loco_collision_cost_weight": 18.0, "loco_waypoint_cost_weight": 0.0,
The drone however cannot take off with a plan with the current package. In order to fly the paths you generate, the drone must be hovering and in offboard mode. Our typical procedure is:
- take off and map out the room while flying under manual control
- once the map is sufficient, fly the drone to your desired start location and flip it into "offboard" mode
- Then using the mapping interface in voxl-portal (3D view), select the "plan home" button and visually validate the path.
- finally, you can select follow path in voxl-portal (while the drone is still hovering in offboard mode) and watch the drone fly the generated trajectory.
Once you are comfortable with this process and have the drone flying some basic paths back to home, it should be straightforward to transition into planning to specific locations.
The mapping and path generation can be done without flight as you have seen, but if the drone is resting on the ground it will likely think it is too close to an obstacle to move - thus the planning may fail. If you would like to continue testing the path generation without flight, it is best to rest the drone on top of an object that it has not already mapped to mimic a hover state before you attempt to plan somewhere. But again, you will not be able to fly this path unless the drone is already in the air.
For the camera controls, we have also had some difficulties with laptops/mobile so I will work on getting the flycontrols added soon!
-
Thanks Matt, I think these are all great suggestions and I look forward to trying it out.
Good luck with the flycontrols or similar change!
-
-
@Matt-Turi thanks so much!