Octomap Navigation? How to?

815 views
Skip to first unread message

Bakhtawar Rehman

unread,
Mar 28, 2018, 2:56:19 PM3/28/18
to OctoMap developers and users discussion

How to use octomap for navigation?

After completing mapping process, i have a map in ".bt" or ".ot" format. Now i want to do amcl on it (say gmapping). But gmapping requires ".pgm" map format. In this case how come i use the map from octomap to do the navigation. I am unable to understand how to acheive this by reading the documentation.


I have tried different approaches. I know i can downproject map by using "projected_map:=map". I have also acquired 2d map from grid_map.


But the problem is that i cannot figure out how to apply amcl or hector or any other navigation algorithm on it. I have used pcl, fake localization, nodelets etc but no luck.


Can anyone please help!! Example file will be more than to appreciated.

I am really stuck on my thesis here!

Bulichev korta

unread,
Apr 5, 2018, 12:58:37 PM4/5/18
to OctoMap developers and users discussion
hello guyz;

I am stuck here.
Here is my file:

<launch> 
<master auto="start"/>

<node name="octomap_server" pkg="octomap_server" type="octomap_server_node" args="$(find mybot_navigation)/maps/myOctomap.bt projected_map:=map"/>

<node pkg="amcl" type="amcl" name="amcl" output="screen"> <remap from="scan" to="mybot/laser/scan"/> </node> 

<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"> <rosparam file="$(find mybot_navigation)/config/costmap_common_params.yaml" command="load" ns="global_costmap"/> <rosparam file="$(find mybot_navigation)/config/costmap_common_params.yaml" command="load" ns="local_costmap"/> <rosparam file="$(find mybot_navigation)/config/local_costmap_params.yaml" command="load" ns="local_costmap"/> <rosparam file="$(find mybot_navigation)/config/global_costmap_params.yaml" command="load"/> <rosparam file="$(find mybot_navigation)/config/base_local_planner_params.yaml" command="load"/>

<remap from="cmd_vel" to="cmd_vel"/>
<remap from="odom" to="odom"/>
<remap from="scan" to="mybot/laser/scan"/>
<param name="move_base/DWAPlannerROS/yaw_goal_tolerance"

value="1.0"/>

</node> <node name="voxel_grid_2_point_cloud" pkg="costmap_2d" type="costmap_2d_cloud"> <remap from="voxel_grid" to="/move_base/local_costmap/obstacle_layer/voxel_grid"/> <remap from="voxel_marked_cloud" to="/move_base/local_costmap/obstacle_layer/marked_cloud"/> <remap from="voxel_unknown_cloud" to="/move_base/local_costmap/obstacle_layer/unknown_cloud"/> </node>

</launch>

-----------------------------------------------------------------

--------------------------------------------------------------------




and here is the error: (I guess this is because i need to pass map in .pgm format here but i dont know how to get it):


PARAMETERS * /amcl/base_frame_id: chassis * /amcl/odom_frame_id: odom * /amcl/odom_model_type: diff-corrected * /amcl/update_min_a: 1.0 * /amcl/update_min_d: 0.5 * /move_base/TrajectoryPlannerROS/acc_lim_theta: 1.5 * /move_base/TrajectoryPlannerROS/acc_lim_x: 0.5 * /move_base/TrajectoryPlannerROS/acc_lim_y: 0.5 * /move_base/TrajectoryPlannerROS/holonomic_robot: False * /move_base/TrajectoryPlannerROS/max_vel_theta: 1.5 * /move_base/TrajectoryPlannerROS/max_vel_x: 0.5 * /move_base/TrajectoryPlannerROS/min_in_place_vel_theta: 0.01 * /move_base/TrajectoryPlannerROS/min_vel_x: 0.01 * /move_base/global_costmap/global_frame: odom * /move_base/global_costmap/height: 10.0 * /move_base/global_costmap/inflation_radius: 3.0 * /move_base/global_costmap/laser_scan_sensor/clearing: True * /move_base/global_costmap/laser_scan_sensor/data_type: LaserScan * /move_base/global_costmap/laser_scan_sensor/marking: True * /move_base/global_costmap/laser_scan_sensor/sensor_frame: velodyne * /move_base/global_costmap/laser_scan_sensor/topic: /mybot/velodyne_p... * /move_base/global_costmap/observation_sources: laser_scan_sensor * /move_base/global_costmap/obstacle_range: 2.5 * /move_base/global_costmap/publish_frequency: 1.0 * /move_base/global_costmap/raytrace_range: 3.0 * /move_base/global_costmap/resolution: 0.05 * /move_base/global_costmap/robot_base_frame: chassis * /move_base/global_costmap/robot_radius: 0.5 * /move_base/global_costmap/static_map: True * /move_base/global_costmap/update_frequency: 1.0 * /move_base/global_costmap/width: 10.0 * /move_base/local_costmap/inflation_radius: 3.0 * /move_base/local_costmap/laser_scan_sensor/clearing: True * /move_base/local_costmap/laser_scan_sensor/data_type: LaserScan * /move_base/local_costmap/laser_scan_sensor/marking: True * /move_base/local_costmap/laser_scan_sensor/sensor_frame: velodyne * /move_base/local_costmap/laser_scan_sensor/topic: /mybot/velodyne_p... * /move_base/local_costmap/local_costmap/global_frame: odom * /move_base/local_costmap/local_costmap/height: 6.0 * /move_base/local_costmap/local_costmap/publish_frequency: 1.0 * /move_base/local_costmap/local_costmap/resolution: 0.05 * /move_base/local_costmap/local_costmap/robot_base_frame: chassis * /move_base/local_costmap/local_costmap/rolling_window: True * /move_base/local_costmap/local_costmap/static_map: False * /move_base/local_costmap/local_costmap/update_frequency: 2.0 * /move_base/local_costmap/local_costmap/width: 6.0 * /move_base/local_costmap/observation_sources: laser_scan_sensor * /move_base/local_costmap/obstacle_range: 2.5 * /move_base/local_costmap/raytrace_range: 3.0 * /move_base/local_costmap/robot_radius: 0.5 * /move_base/move_base/DWAPlannerROS/xy_goal_tolerance: 1.0 * /move_base/move_base/DWAPlannerROS/yaw_goal_tolerance: 1.0 * /rosdistro: kinetic * /rosversion: 1.12.13

NODES / amcl (amcl/amcl) move_base (move_base/move_base) octomap_server (octomap_server/octomap_server_node) voxel_grid_2_point_cloud (costmap_2d/costmap_2d_cloud)

ROS_MASTER_URI=http://localhost:11311

process[octomap_server-1]: started with pid [22729] process[amcl-2]: started with pid [22750] process[move_base-3]: started with pid [22791] process[voxel_grid_2_point_cloud-4]: started with pid [22798] [ INFO] [1522939362.714143005]: Requesting the map... [ WARN] [1522939362.714876172]: Request for map failed; trying again... [ WARN] [1522939362.743585937, 335.350000000]: Timed out waiting for transform from chassis to odom to become available before running costmap, tf error: canTransform: target_frame odom does not exist. canTransform: source_frame chassis does not exist.. canTransform returned after 335.35 timeout was 0.1. [ INFO] [1522939362.759692020, 335.362000000]: Using plugin "static_layer" [ INFO] [1522939362.769312082, 335.372000000]: Requesting the map... [ INFO] [1522939362.983804435, 335.575000000]: Resizing costmap to 264 X 346 at 0.050000 m/pix [ INFO] [1522939363.090305690, 335.675000000]: Received a 264 X 346 map at 0.050000 m/pix [ INFO] [1522939363.096959468, 335.681000000]: Using plugin "obstacle_layer" [ INFO] [1522939363.100040819, 335.684000000]: Subscribed to Topics: laser_scan_sensor [ INFO] [1522939363.132762652, 335.715000000]: Using plugin "inflation_layer" [ERROR] [1522939363.158983111, 335.738000000]: You must specify at least three points for the robot footprint, reverting to previous footprint. [ WARN] [1522939363.364006206, 335.933000000]: Request for map failed; trying again... [ WARN] [1522939363.890357955, 336.434000000]: Request for map failed; trying again...

Reply all
Reply to author
Forward
0 new messages