Skip to content

Commit 8405f25

Browse files
authored
Add nav2 to the panther (#198)
* Update environment variables for the meshes Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Enable nav2 navigation to panther.launch Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Add nav2 launch file and integration tests for Panther navigation Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Remove redundant navigation launch instructions from Panther documentation Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Refactor navigation launch setup: replace navigation.launch.py with nav2.launch.py and update launch arguments Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Add collision monitor argument to navigation launch files Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Update build cache reference in reusable-docker.yml to use 'build-cache-latest' Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Update test_panther_nav2.py: Enable RViz and adjust navigation goal position and orientation Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Refactor test_panther_nav2.py: Disable RViz and remove unnecessary sleep in registration test Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Add support for real lidar. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Define velodyne as separate 'robot'. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Fix reuse. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Add velodyne packages to docker image. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Fix parameters. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Fix spawn position of panther. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Set nav2 default to false. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Remove old panther namespace. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Enable nav2 in launch file for test. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Fix for use on real robot. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Update transform_tolerance in controller_server parameters to improve navigation stability Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Add velodyne robot model to rviz. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> --------- Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com>
1 parent 9ae383b commit 8405f25

File tree

23 files changed

+1583
-511
lines changed

23 files changed

+1583
-511
lines changed

dockerfiles/install_scripts/core_packages.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ apt install -y \
2929
ros-$ROS_DISTRO-rmw-cyclonedds-cpp \
3030
ros-$ROS_DISTRO-ros-gz \
3131
ros-$ROS_DISTRO-ros2-controllers \
32+
ros-$ROS_DISTRO-rqt-tf-tree \
3233
ros-$ROS_DISTRO-slam-toolbox \
34+
ros-$ROS_DISTRO-velodyne \
3335
ros-$ROS_DISTRO-velodyne-description
3436

3537
pip install uv --break-system-packages

docs/content/panther.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,6 @@ Rviz should visualize "slow-down" regions around the Panther and the Panther sho
168168
ros2 launch rcdt_panther panther.launch.py nav2:=True
169169
```
170170

171-
Next, start navigation in a second terminal:
172-
173-
```bash
174-
ros2 launch rcdt_panther navigation.launch.py
175-
```
176-
177171
Now you should be able to place a *2D Goal Pose* in Rviz, somewhere on the map. The robot should plan, visualize and drive a route to this goal pose.
178172

179173
:::{note}

ros2_ws/src/rcdt_gazebo/launch/gazebo_robot.launch.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
load_gazebo_ui_arg = LaunchArgument("load_gazebo_ui", False, [True, False])
1616
world_arg = LaunchArgument("world", "empty_camera.sdf")
1717
robots_arg = LaunchArgument("robots", "")
18-
positions_arg = LaunchArgument("positions", "0-0-0")
18+
positions_arg = LaunchArgument("positions", "0,0,0")
1919
use_realsense_arg = LaunchArgument("realsense", False, [True, False])
20-
use_velodyne_arg = LaunchArgument("velodyne", False, [True, False])
2120

2221

2322
def launch_setup(context: LaunchContext) -> list:
@@ -37,7 +36,6 @@ def launch_setup(context: LaunchContext) -> list:
3736
robots = robots_arg.string_value(context).split(" ")
3837
positions = positions_arg.string_value(context).split(" ")
3938
use_realsense = use_realsense_arg.bool_value(context)
40-
use_velodyne = use_velodyne_arg.bool_value(context)
4139

4240
sdf_file = get_file_path("rcdt_gazebo", ["worlds"], world)
4341
sdf = ET.parse(sdf_file)
@@ -65,11 +63,11 @@ def launch_setup(context: LaunchContext) -> list:
6563
"/franka/realsense/depth/image_rect_raw_float@sensor_msgs/msg/Image@gz.msgs.Image",
6664
]
6765
)
68-
if use_velodyne:
66+
if "velodyne" in robots:
6967
bridge_topics.extend(
7068
[
71-
"/panther/velodyne/scan@sensor_msgs/msg/LaserScan@gz.msgs.LaserScan",
72-
"/panther/velodyne/scan/points@sensor_msgs/msg/PointCloud2@gz.msgs.PointCloudPacked",
69+
"/velodyne/scan@sensor_msgs/msg/LaserScan@gz.msgs.LaserScan",
70+
"/velodyne/scan/points@sensor_msgs/msg/PointCloud2@gz.msgs.PointCloudPacked",
7371
]
7472
)
7573

@@ -82,7 +80,7 @@ def launch_setup(context: LaunchContext) -> list:
8280
spawn_robots: list[Node] = []
8381
for robot, position in zip(robots, positions, strict=False):
8482
namespace = "" if not robot else f"/{robot}"
85-
x, y, z = position.split("-")
83+
x, y, z = position.split(",")
8684
spawn_robot = Node(
8785
package="ros_gz_sim",
8886
executable="create",
@@ -143,7 +141,6 @@ def generate_launch_description() -> LaunchDescription:
143141
robots_arg.declaration,
144142
positions_arg.declaration,
145143
use_realsense_arg.declaration,
146-
use_velodyne_arg.declaration,
147144
OpaqueFunction(function=launch_setup),
148145
]
149146
)

ros2_ws/src/rcdt_mobile_manipulator/launch/core.launch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def launch_setup(context: LaunchContext) -> list:
4646
"panther",
4747
]
4848
positions = [
49-
f"0-0-{FRANKA_HEIGHT}",
50-
"0-0-0.2",
49+
f"0,0,{FRANKA_HEIGHT}",
50+
"0,0,0.2",
5151
]
5252
robot = RegisteredLaunchDescription(
5353
get_file_path("rcdt_gazebo", ["launch"], "gazebo_robot.launch.py"),

0 commit comments

Comments
 (0)