Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package rename #300

Merged
merged 3 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions panther/panther_simulation.repos
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repositories:
husarion_office_gz:
husarion_gz_worlds:
type: git
url: https://github.com/husarion/husarion_office_gz.git
url: https://github.com/husarion/husarion_gz_worlds.git
version: main
2 changes: 1 addition & 1 deletion panther_description/urdf/gazebo.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<enable_recharge>true</enable_recharge>
<charging_time>${battery_config['charging_time']}</charging_time>
<soc_threshold>2.0</soc_threshold>
<!-- TODO: Because of https://github.com/gazebosim/gz-sim/issues/225 division by 100-->
<!-- TODO Because of https://github.com/gazebosim/gz-sim/issues/225 division by 100 -->
<power_load>${battery_config['power_load']/100.0}</power_load>
<start_draining>${battery_config['simulate_discharging']}</start_draining>
<ros>
Expand Down
4 changes: 3 additions & 1 deletion panther_gazebo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ The recommended method for launching the simulation is by utilizing the [simulat
- `battery_config_path` [*string*, default: **panther_gazebo/config/battery_plugin_config.yaml**]: Path to the Ignition `LinearBatteryPlugin` configuration file. This configuration is intended for use in simulations only. For more information on how to configure this plugin, please refer to the [Linear Battery Plugin](#linear-battery-plugin) section.
- `controller_config_path` [*string*, default: **panther_controller/config/<wheel_type arg>_controller.yaml**]: Path to the controller configuration file. If you want to use a custom configuration, you can specify the path to your custom controller configuration file here.
- `gz_bridge_config_path` [*string*, default: **panther_gazebo/config/gz_bridge.yaml**]: Path to the `parameter_bridge` configuration file. For detailed information on configuring the `parameter_bridge`, please refer to this [example](https://github.com/gazebosim/ros_gz/tree/ros2/ros_gz_bridge#example-5-configuring-the-bridge-via-yaml).
- `gz_log_level` [*[0-4]*, default: **1**]: Adjust the level of console output.
- `headless_mode` [*bool*, default: **False**]: Run the simulation in headless mode. Useful when a GUI is not needed or to reduce the amount of calculations.
- `pos_x` [*float*, default: **5.0**]: spawn position **[m]** of the robot in the world in **X** direction.
- `pos_y` [*float*, default: **-5.0**]: spawn position **[m]** of the robot in the world in **Y** direction.
- `pos_z` [*float*, default: **0.2**]: spawn position **[m]** of the robot in the world in **Z** direction.
- `rot_yaw` [*float*, default: **0.0**]: spawn yaw angle **[rad]** of the robot in the world.
- `publish_robot_state` [*bool*, default: **true**]: Whether to launch the robot_state_publisher node. When set to `false`, users should publish their own robot description.
- `wheel_config_path` [*string*, default: **panther_description/config/<wheel_type arg>.yaml**]: Path to the wheel configuration file. If you want to use a custom configuration, you can specify the path to your custom wheel configuration file here. Please refer to the `wheel_type` parameter description for more information.
- `wheel_type` [*string*, default: **WH01**]: Specify the type of wheel. If you select a value from the provided options (`WH01`, `WH02`, `WH04`), you can disregard the `wheel_config_path` and `controller_config_path` parameters. If you have custom wheels, set this parameter to `CUSTOM` and provide the necessary configurations.
- `world` [*string*, default: **-r <husarion_office_gz share directory>/worlds/husarion_world.sdf**]: path to Gazebo world file used for simulation.
- `world` [*string*, default: **-r <husarion_gz_worlds share directory>/worlds/husarion_world.sdf**]: path to Gazebo world file used for simulation.

### Changing Wheel Type

Expand Down
20 changes: 1 addition & 19 deletions panther_gazebo/launch/simulation.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,6 @@ def generate_launch_description():
description="Path to the parameter_bridge configuration file",
)

world_cfg = LaunchConfiguration("world")
declare_world_arg = DeclareLaunchArgument(
"world",
default_value=[
"-r ",
PathJoinSubstitution(
[
FindPackageShare("husarion_office_gz"),
"worlds",
"husarion_world.sdf",
],
),
],
description="SDF world file",
)

pose_x = LaunchConfiguration("pose_x")
declare_pose_x_arg = DeclareLaunchArgument(
"pose_x",
Expand Down Expand Up @@ -167,13 +151,12 @@ def generate_launch_description():
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
FindPackageShare("ros_gz_sim"),
FindPackageShare("husarion_gz_worlds"),
"launch",
"gz_sim.launch.py",
]
)
),
launch_arguments={"gz_args": world_cfg}.items(),
)

gz_spawn_entity = Node(
Expand Down Expand Up @@ -232,7 +215,6 @@ def generate_launch_description():

return LaunchDescription(
[
declare_world_arg,
declare_pose_x_arg,
declare_pose_y_arg,
declare_pose_z_arg,
Expand Down
2 changes: 1 addition & 1 deletion panther_gazebo/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">controller_manager</exec_depend>
<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">husarion_office_gz</exec_depend>
<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">husarion_gz_worlds</exec_depend>
<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">ign_ros2_control</exec_depend>
<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">launch</exec_depend>
<exec_depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">launch_ros</exec_depend>
Expand Down