Skip to content
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
2 changes: 1 addition & 1 deletion src/description/config/athena_drive_sim_controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ controller_manager:
ackermann_steering_controller:
ros__parameters:
# Joint names
rear_wheels_names: ["propulsion_fl_joint", "propulsion_fr_joint"]
rear_wheels_names: ["propulsion_bl_joint", "propulsion_br_joint"]
front_wheels_names: ["steer_fl_joint", "steer_fr_joint"]

# Vehicle dimensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@


<joint name="${prefix}propulsion_br_joint">
<command_interface name="velocity"/>
<state_interface name="position">
<param name="initial_value">0.0</param>
</state_interface>
Expand All @@ -119,6 +120,7 @@


<joint name="${prefix}propulsion_bl_joint">
<command_interface name="velocity"/>
<state_interface name="position">
<param name="initial_value">0.0</param>
</state_interface>
Expand Down
33 changes: 33 additions & 0 deletions src/simulation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# simulation

## Common Issues

### Missing terrain.dae file

You may run into issues with a missing terrain.dae file. The issue is that the `terrain.dae` file is stored in **Git LFS** (Large File Storage), but hasn't been downloaded. To fix this, do the following:

1. Install git-lfs if not already installed
```bash
sudo apt install git-lfs
```

2. Initialize git-lfs in your local repo
```bash
git lfs install
```

3. Pull the actual LFS files
```bash
git lfs pull
```

### Ground truth TF publisher not found

If you get an error like `executable 'ground_truth_tf_publisher.py' not found on the libexec directory` when launching with `publish_ground_truth_tf:=true`, the script needs executable permissions.

Fix it by running:
```bash
chmod +x src/simulation/scripts/ground_truth_tf_publisher.py
colcon build --packages-select simulation
source install/setup.bash
```
2 changes: 1 addition & 1 deletion src/simulation/launch/bridge.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def generate_launch_description():
name='imu_bridge',
output='screen',
arguments=[
'/imu@sensor_msgs/msg/Imu@gz.msgs.IMU',
'/imu@sensor_msgs/msg/Imu[gz.msgs.IMU',
],
),

Expand Down
3 changes: 1 addition & 2 deletions src/simulation/launch/bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ def generate_launch_description():
gazebo = IncludeLaunchDescription(
PythonLaunchDescriptionSource([gazebo_launch]),
launch_arguments=[
('use_sim_time', LaunchConfiguration('use_sim_time')),
('world', LaunchConfiguration('world')),
('world', LaunchConfiguration('world')), # World file taken from description/worlds/
]
)

Expand Down
5 changes: 1 addition & 4 deletions src/simulation/launch/gz_sim.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution

ARGUMENTS = [
DeclareLaunchArgument('use_sim_time', default_value='true',
choices=['true', 'false'],
description='use_sim_time'),
DeclareLaunchArgument('world', default_value='empty.sdf',
description='Gazebo world file'),
]
Expand Down Expand Up @@ -37,7 +34,7 @@ def generate_launch_description():
launch_arguments=[
('gz_args', [world_path,
' -r',
' -v 4']
' -v 4'] # Verbosity level, 0=errors only, 4=debug
)
]
)
Expand Down
12 changes: 7 additions & 5 deletions src/simulation/launch/spawn.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@
description='use_sim_time'),
DeclareLaunchArgument('namespace', default_value='',
description='Robot namespace'),

DeclareLaunchArgument('world_name', default_value='',
description='World name'),

]

def generate_launch_description():
pkg_share = get_package_share_directory('description')
pkg_description = get_package_share_directory('description')

urdf_file = os.path.join(pkg_share, 'urdf', 'athena_drive.urdf.xacro')
controllers_file = os.path.join(pkg_share, 'config', 'athena_drive_sim_controllers.yaml')
urdf_file = os.path.join(pkg_description, 'urdf', 'athena_drive.urdf.xacro')
controllers_file = os.path.join(pkg_description, 'config', 'athena_drive_sim_controllers.yaml')


namespace = LaunchConfiguration('namespace')
robot_name = 'rover'
robot_name = 'athena'

robot_description_content = Command([
'xacro ', urdf_file,
Expand Down Expand Up @@ -62,6 +63,7 @@ def generate_launch_description():
package='ros_gz_sim',
executable='create',
arguments=['-name', robot_name,
'-world', LaunchConfiguration('world_name'),
'-x', '0.0',
'-y', '0.0',
'-z', '3.0',
Expand Down
Empty file modified src/simulation/scripts/ground_truth_tf_publisher.py
100644 → 100755
Empty file.