Skip to content

Commit 274ad2b

Browse files
authored
Update README.md
1 parent 35bc8ab commit 274ad2b

File tree

1 file changed

+54
-5
lines changed

1 file changed

+54
-5
lines changed

README.md

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ make install
119119
The test executables are in the folder: `build/src/test/`.
120120
121121
---
122-
# ROS 2 Humble Test Environment with Gazebo Fortress
122+
# ROS 2 Humble Test Environment with Turtlebot3 and Husky
123123
124-
This provides instructions for setting up a test environment using **Gazebo Fortress** and **ROS 2 Humble**. The setup includes configurations for using the Husky robot and ensures that the necessary resources are in place for smooth operation.
124+
This provides instructions for setting up a test environment using **Gazebo Fortress** for Husky and **Gazebo Classic** for Turtlebot3 with **ROS 2 Humble**. The setup includes configurations for using the Husky robot and ensures that the necessary resources are in place for smooth operation.
125125
126126
## Prerequisites
127127
@@ -143,7 +143,7 @@ sudo apt-get install -y ros-humble-libg2o
143143
### 3. Get ugv_nav4d_ros2 and a test environment for robot husky in gazebo
144144
145145
```
146-
mkdir -p your_ros2_workspace/src
146+
mkdir -p ~/your_ros2_workspace/src
147147
cd ~/your_ros2_workspace/src
148148
git clone https://github.com/dfki-ric/ugv_nav4d_ros2.git
149149
```
@@ -154,6 +154,7 @@ git clone https://github.com/dfki-ric/ros2_humble_gazebo_sim.git
154154
cd ros2_humble_gazebo_sim
155155
bash install_dependencies.bash
156156
```
157+
157158
### 4. Husky Configuration
158159
To ensure that Gazebo can find the robot model, you need to export the following environment variable. Replace /path/to/ with the actual **complete** path where you clone the repository `ros2_humble_gazebo_sim`. Add this command to your terminal:
159160
```
@@ -169,7 +170,55 @@ source path/to/ugv_nav4d/build/install/env.sh
169170
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
170171
```
171172
172-
### 6. Start the Test Environment
173+
### 6. Test Environment with Turlebot3 and Nav2 Integration
174+
Follow the steps in this section to play around with a Turtlebot3 and Nav2. Ugv_nav4d expects a pointcloud map. The map can be provided by SLAM or static pointclouds as `PLY`. A dummp flat plane `PLY` file is used in these steps.
175+
176+
Install turtlebot3-gazebo package and launch simulation
177+
```
178+
sudo apt-get install ros-humble-turtlebot3-gazebo
179+
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py headless:=false x_pose:=2.0 y_pose:=2.0
180+
```
181+
Clone a repo with config files for nav2 and ugv_nav4d
182+
```
183+
cd ~/your_ros2_workspace
184+
git clone [email protected]:haider8645/turtlebot3_nav2_ugv_nav4d_config.git
185+
```
186+
Start nav2 controller_server
187+
188+
Note: Please provide the fullpath for `your_ros2_workspace` in the launch file arguments.
189+
```
190+
cd turtlebot3_nav2_ugv_nav4d_config
191+
ros2 launch turtle_nav2.launch.py nav2_param_path:=/path/to/your_ros2_workspace/turtlebot3_nav2_ugv_nav4d_config/turtle_nav2.yaml rviz_config_path:=/path/to/your_ros2_workspace/turtlebot3_nav2_ugv_nav4d_config/turtle.rviz
192+
```
193+
In a new terminal, configure and activate the nav2 controller_server
194+
```
195+
ros2 lifecycle set /controller_server configure
196+
ros2 lifecycle set /controller_server activate
197+
```
198+
In a new terminal, start ugv_nav4d
199+
200+
Note: Please provide the fullpath for `your_ros2_workspace` in the launch file arguments and accordingly edit the parameter `mls_file_path` in `turtle_ugv_nav4d.yaml`.
201+
```
202+
ros2 launch ugv_nav4d_ros2 ugv_nav4d.launch.py goal_topic:=/goal_pose main_param_file:=/path/to/your_ros2_workspace/turtlebot3_nav2_ugv_nav4d_config/turtle_ugv_nav4d.yaml
203+
```
204+
In new terminals, start scripts to send FollowPath action calls to nav2 and for Path visualization
205+
```
206+
cd ~/your_ros2_workspace/src/ugv_nav4d_ros2/scripts
207+
python3 follow_path_client.py
208+
```
209+
and
210+
```
211+
cd ~/your_ros2_workspace/src/ugv_nav4d_ros2/scripts
212+
python3 visualize_path.py
213+
```
214+
Visualize the MLS Map using
215+
```
216+
ros2 service call /ugv_nav4d_ros2/map_publish std_srvs/srv/Trigger
217+
```
218+
219+
You can now send goals to the planner using `2D Goal Pose` in rviz and visualize the results.
220+
221+
### 7. Test Environment with Husky
173222
Launch the Gazebo simulation by executing the following command in your terminal:
174223
```
175224
source ~/your_ros2_workspace/install/setup.bash
@@ -230,7 +279,7 @@ In a new terminal, start a python script to visualize the labeled path in rviz2.
230279
cd ~/your_ros2_workspace/src/ugv_nav4d_ros2/scripts
231280
python3 visualize_path.py
232281
```
233-
### 7. Plan
282+
### 8. Plan
234283
235284
In a new terminal, start Rviz2.
236285
```

0 commit comments

Comments
 (0)