Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNoobInventor committed Dec 4, 2023
1 parent 7b7ed36 commit 76d6526
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 29 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,34 +680,48 @@ Then save the generated map.

## Navigation

TODO: Brief overview

### Gazebo

Nav2's amcl package is used for localization with the map generated from slam_toolbox
Nav2's `amcl` package is used for localization with the map generated from ``slam_toolbox`.

Bring up lidarbot in Gazebo classic:

```
ros2 launch lidarbot_gazebo gazebo_launch.py
```

Note map location and name
Navigate to the development workspace and open the following terminals.

To open `rviz`:

```
rviz2 -d src/lidarbot_navigation/rviz/lidarbot_nav.rviz
```

To localize lidarbot with `amcl` in the map generated by `slam_toolbox`:
```
ros2 launch lidarbot_navigation localization_launch.py map:=./sim_map.yaml use_sim_time:=true
ros2 launch lidarbot_navigation localization_launch.py \
map:=./src/lidarbot_navigation/maps/sim_map.yaml use_sim_time:=true
```

To launch navigation:
```
ros2 launch lidarbot_navigation navigation_launch.py use_sim_time:=true \
map_subscribe_transient_local:=true
```

Set initial pose using the `2D Pose Estimate` button in the toolbar
In rviz, set the initial pose using the `2D Pose Estimate` button in the toolbar so that lidarbot is aligned correctly both in rviz and Gazebo classic. Afterwards, click on the `2D Goal Pose` and choose a place on the map for lidarbot to navigate to:

<p align='center'>
<img src=docs/images/gazebo_navigation.gif width="800">
</p>

Note about the pixels

Blue arrow shows unfiltered odometry, while green shows the filtered odometry. The number of arrows shown is the number of odometry data to keep before removing the oldest. 0 means keep all of them.
Note about the pixels not part of the map

The blue arrow shows unfiltered odometry, while green shows the filtered odometry.

### Lidarbot

Expand All @@ -730,6 +744,8 @@ ros2 launch lidarbot_navigation navigation_launch.py use_sim_time:=false \
map_subscribe_transient_local:=true
```

Using navigation goal button from nav2 plugin

Use waypoint mode here

TODO:
Expand Down
Binary file added docs/images/gazebo_navigation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions lidarbot_bringup/launch/rplidar_launch.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#!/usr/bin/env python3

import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import LogInfo
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node

Expand All @@ -17,7 +14,7 @@ def generate_launch_description():
frame_id = LaunchConfiguration('frame_id', default='lidar_link')
inverted = LaunchConfiguration('inverted', default='false')
angle_compensate = LaunchConfiguration('angle_compensate', default='true')
scan_mode = LaunchConfiguration('scan_mode', default='Sensitivity')
scan_mode = LaunchConfiguration('scan_mode', default='Standard')

return LaunchDescription([

Expand Down Expand Up @@ -50,6 +47,7 @@ def generate_launch_description():
'angle_compensate',
default_value=angle_compensate,
description='Specifying whether or not to enable angle_compensate of scan data'),

DeclareLaunchArgument(
'scan_mode',
default_value=scan_mode,
Expand All @@ -65,6 +63,7 @@ def generate_launch_description():
'serial_baudrate': serial_baudrate,
'frame_id': frame_id,
'inverted': inverted,
'angle_compensate': angle_compensate}],
'angle_compensate': angle_compensate,
'scan_mode': scan_mode}],
output='screen'),
])
])
3 changes: 1 addition & 2 deletions lidarbot_navigation/config/ekf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ekf_filter_node:

frequency: 50.0
two_d_mode: true
print_diagnostics: true

map_frame: map
odom_frame: odom
Expand All @@ -32,4 +31,4 @@ ekf_filter_node:
false, false, false,
false, false, false,
false, false, true,
true, false, false]
true, false, false]
Binary file removed lidarbot_navigation/maps/library_save.pgm
Binary file not shown.
7 changes: 0 additions & 7 deletions lidarbot_navigation/maps/library_save.yaml

This file was deleted.

Binary file removed lidarbot_navigation/maps/library_serial.data
Binary file not shown.
Binary file removed lidarbot_navigation/maps/library_serial.posegraph
Binary file not shown.
Binary file removed lidarbot_navigation/maps/real_map.data
Binary file not shown.
Binary file removed lidarbot_navigation/maps/real_map.pgm
Binary file not shown.
Binary file removed lidarbot_navigation/maps/real_map.posegraph
Binary file not shown.
7 changes: 0 additions & 7 deletions lidarbot_navigation/maps/real_map.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion lidarbot_navigation/maps/sim_map.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: sim2_map.pgm
image: sim_map.pgm
mode: trinary
resolution: 0.05
origin: [-5.21, -5.44, 0]
Expand Down

0 comments on commit 76d6526

Please sign in to comment.