Dear @Vishnu,
Could you please assist on how to proceed? Do you already have a package for SLAM with 3D Lidar.
Ofcourse. Usually for ROS navigation there are multiple ways to go around it and is usually dependent on the user on how they wish to configure it. As mentioned in the go1 manual pg:13, sec:8.4 the navigation can be performed via odom and or map.
Odom and Map Navigation
To integrate the lidar for obstacle avoidance in odom navigation simply replace the topic to parameter in the go1_navigation/params/costmap_common_params.yaml file
e.g.
obstacles_layer:
observation_sources: scan
track_unknown_space: true
scan:
{
sensor_frame: os_sensor,
data_type: PointCloud2,
topic: /ouster/points,
marking: true,
clearing: true,
inf_is_valid: true,
min_obstacle_height: 0.37,
max_obstacle_height: 0.5,
obstacle_range: 5.0, #if beyond this threshold, then will not mark as obstacle
raytrace_range: 7.0 #5.0 Lower this value to detect nearer obstacles with better accuracy
}
obstacles_layer:
observation_sources: scan
track_unknown_space: true
scan:
{
sensor_frame: os_sensor,
data_type: PointCloud2,
topic: /go1/rslidar_points,
marking: true,
clearing: true,
inf_is_valid: true,
min_obstacle_height: 0.37,
max_obstacle_height: 0.5,
obstacle_range: 5.0, #if beyond this threshold, then will not mark as obstacle
raytrace_range: 7.0 #5.0 Lower this value to detect nearer obstacles with better accuracy
}
In here you can configure the height of how far you want the obstacles to be etc. At the end of the go1 manual there are some links on ROS tutorials which I recommend you going through as everything mentioned there is applicable here.
Now you should be able to do the odom navigation as well as map navigation with obstacle avoidance. For map navigation you would require a map pre-built or create it yourself via SLAM
SLAM
The first step is mapping which we recommend to do via SLAM_TOOLBOX (optionally gmapping but not recommended as its quality is not good). It is upto the user on which tools they want to use, however, we would recommend using SLAM_TOOLBOX.
To perform slam with slam_toolbox
- Make sure slam_toolbox is installed via:
sudo apt-get install ros-noetic-slam-toolbox # For host pc
or if you are doing it on the robot directly
sudo apt-get install ros-melodic-slam-toolbox # For host pc
- You can then modify then go1_navigation point_cloud_to_laser_scan.launch and remove the .xml extension and remap the topic cloud_in to
/go1/rslidar_points
\
- Now launch
roslaunch go1_navigation point_cloud_to_laser_scan.launch
and run slam toolbox via
roslaunch slam_toolbox online_async.launch
The map should be creating now as you move the robot. It is advised to move the robot slowly as you map so that it creates it consistently.
rosrun map_server map_saver -f "$(rospack find go1_navigation)/maps/devshop"
- Once saved you can then run map_navigation (please check and modify the files where necessary, e.g remove ouster lidar launch, remove the xml tag from point cloud to laserscan etc.) to use the robot in the map where it would autonomously localize itself after being provided with the initial position.
Again, I would highly recommend viewing the tutorial mentioned at the end of the manual
Cheers,
S. O. Sohail