Skip to content

Commit

Permalink
Solved cmd_vel issues. Solved amcl issues
Browse files Browse the repository at this point in the history
Signed-off-by: Gonzalo de Pedro <[email protected]>
  • Loading branch information
Gonzalo de Pedro committed Apr 20, 2023
1 parent fd529e5 commit 1724ef9
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 93 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ Summary of of the packages in the repository.
- Spawn Noah
- Run rviz2 (optional)

### noah_navigation:
- Holds navigation configuration for Slam or to navigate `small_house.world` world.
- Launch file for:
- Navigation on 'small_house.world'
- Slam


## Using docker

Expand Down Expand Up @@ -143,3 +149,26 @@ Once simulation is running, in other terminal run:
```sh
ros2 run teleop_twist_keyboard teleop_twist_keyboard cmd_vel:=noah/cmd_vel
```

Try Navigation!

Launch simulation in the 'small house' world:
```sh
ros2 launch noah_gazebo noah_gazebo.launch.py world:=small_house.world
```
Once simulation is running, in other terminal run:
```sh
ros2 launch noah_navigation noah_navigation.launch.py
```

Try Slam!

Run:
```sh
ros2 launch noah_navigation noah_navigation.launch.py slam:=True
```

To save map:
```sh
ros2 run nav2_map_server map_saver_cli -f ~/map
```
3 changes: 2 additions & 1 deletion noah_navigation/launch/noah_navigation.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
from launch_ros.actions import Node, SetRemap


def generate_launch_description():
Expand Down Expand Up @@ -40,6 +40,7 @@ def generate_launch_description():

return LaunchDescription(
[
SetRemap(src="/cmd_vel", dst="/noah/cmd_vel"),
DeclareLaunchArgument("slam", default_value=use_slam, description="Whether run a SLAM"),
DeclareLaunchArgument("map", default_value=map_dir, description="Full path to map file to load"),
DeclareLaunchArgument(
Expand Down
3 changes: 2 additions & 1 deletion noah_navigation/params/noah_navigation_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ amcl:
resample_interval: 1
robot_model_type: "nav2_amcl::DifferentialMotionModel"
save_pose_rate: 0.5
scan_topic: "/noah/laser_scan"
sigma_hit: 0.2
tf_broadcast: true
transform_tolerance: 1.0
Expand All @@ -38,7 +39,7 @@ amcl:
z_rand: 0.5
z_short: 0.05
set_initial_pose: True
initial_pose: {x: 4.0, y: 7.0, z: 0.0, yaw: 3.14159} #ISaac (-14, 0 -7)
initial_pose: {x: -0.422, y: 0.626, z: 0.0, yaw: 0.0}

amcl_map_client:
ros__parameters:
Expand Down
Loading

0 comments on commit 1724ef9

Please sign in to comment.