Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
  • Loading branch information
delihus committed Nov 26, 2024
1 parent b236f88 commit 9522206
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 93 deletions.
3 changes: 2 additions & 1 deletion panther_docking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ The package contains a `PantherChargingDock` plugin for the [opennav_docking](ht

## Configuration Files

- [`panther_docking_server.yaml`](./config/panther_docking_server.yaml): Defines parameters for a `docking_server` and a `PantherChargingDock` plugin.
- [`panther_docking_server.yaml`](./config/panther_docking_server.yaml): Defines parameters for a `docking_server` and a `PantherChargingDock` plugin. Defines poses where charging docks are spawned in the Gazebo.


## ROS Nodes

Expand Down
2 changes: 0 additions & 2 deletions panther_docking/config/apriltag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
size: 0.06
profile: false


max_hamming: 0
detector:
threads: 1
Expand All @@ -16,7 +15,6 @@
sharpening: 0.25
debug: false


tag:
ids: [0, 1]
frames: [main_apriltag_link, backup_apriltag_link]
Expand Down
2 changes: 1 addition & 1 deletion panther_docking/config/panther_docking_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
type: panther_charging_dock
frame: <robot_namespace>/map
dock_frame: backup_wibotic_receiver_requested_pose_link
pose: [-1.0, 1.5, 1.57] # position of the dock on the map. Used also for spawning dock in the simulation.
pose: [-1.0, 1.5, 1.57] # [x, y, yaw] pose of the dock on the map. Used also for spawning dock in the simulation.
apriltag_id: 1

controller:
Expand Down
10 changes: 1 addition & 9 deletions panther_docking/launch/docking.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ def generate_launch_description():
description=("Path to docking server configuration file."),
)

declare_use_docking_arg = DeclareLaunchArgument(
"use_docking",
default_value="True",
description="Enable docking server.",
choices=["True", "False", "true", "false"],
)

apriltag_config_path = LaunchConfiguration("apriltag_config_path")
declare_apriltag_config_path_arg = DeclareLaunchArgument(
"apriltag_config_path",
Expand Down Expand Up @@ -170,9 +163,8 @@ def generate_launch_description():
[
declare_apriltag_config_path_arg,
declare_docking_server_config_path_arg,
declare_use_docking_arg,
declare_use_wibotic_info_arg,
declare_log_level,
declare_use_wibotic_info_arg,
station_launch,
docking_server_node,
docking_server_activate_node,
Expand Down
8 changes: 8 additions & 0 deletions panther_docking/launch/station.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,18 @@ def generate_launch_description():
description="Size in meters of a generated apriltag on the station",
)

declare_use_docking_arg = DeclareLaunchArgument(
"use_docking",
default_value="True",
description="Enable docking server.",
choices=["True", "False", "true", "false"],
)

return LaunchDescription(
[
declare_apriltag_id,
declare_apriltag_size,
declare_use_docking_arg,
OpaqueFunction(function=launch_stations_descriptions),
]
)
6 changes: 4 additions & 2 deletions panther_docking/src/panther_charging_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ bool PantherChargingDock::getRefinedPose(PoseStampedMsg & pose)
auto duration = rclcpp::Time(request_detection_time) - rclcpp::Time(dock_pose_.header.stamp);
if (duration > timeout) {
RCLCPP_WARN_STREAM(
logger_, "Lost detection or did not detect: timeout exceeded: "
<< duration.seconds() << "s timeout: " << timeout.seconds() << "s");
logger_, "Detection timeout exceeded. Duration since last detection: "
<< duration.seconds() << " seconds (timeout threshold: " << timeout.seconds()
<< " seconds). "
<< "No detection received or lost detection for external detection.");
return false;
}

Expand Down
1 change: 0 additions & 1 deletion panther_gazebo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ The package contains a launch file and source files used to run the robot simula
- [`battery_plugin_config.yaml`](./config/battery_plugin_config.yaml): Simulated LinearBatteryPlugin configuration.
- [`gz_bridge.yaml`](./config/gz_bridge.yaml): Specify data to exchange between ROS and Gazebo simulation.
- [`teleop_with_estop.config`](./config/teleop_with_estop.config): Gazebo layout configuration file, which adds E-Stop and Teleop widgets.
- [`panther_docking_server.yaml`](../panther_docking/config/panther_docking_server.yaml): Defines poses for charging docks.

## ROS Nodes

Expand Down
62 changes: 0 additions & 62 deletions panther_gazebo/launch/apriltag.launch.py

This file was deleted.

14 changes: 0 additions & 14 deletions panther_gazebo/launch/simulate_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,6 @@ def generate_launch_description():
launch_arguments={"namespace": namespace, "use_sim": "True"}.items(),
)

apriltag_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
FindPackageShare("panther_gazebo"),
"launch",
"apriltag.launch.py",
]
),
),
launch_arguments={"namespace": namespace, "use_sim": "True"}.items(),
)

return LaunchDescription(
[
declare_battery_config_path_arg,
Expand All @@ -227,6 +214,5 @@ def generate_launch_description():
simulate_components,
gz_bridge,
docking_launch,
apriltag_launch,
]
)
1 change: 0 additions & 1 deletion panther_gazebo/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">std_msgs</depend>
<depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">std_srvs</depend>

<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">apriltag_ros</exec_depend>
<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">controller_manager</exec_depend>
<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">husarion_gz_worlds</exec_depend>
<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">launch</exec_depend>
Expand Down

0 comments on commit 9522206

Please sign in to comment.