diff --git a/src/description/config/athena_drive_sim_controllers.yaml b/src/description/config/athena_drive_sim_controllers.yaml index 3656205..00bd01c 100644 --- a/src/description/config/athena_drive_sim_controllers.yaml +++ b/src/description/config/athena_drive_sim_controllers.yaml @@ -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 diff --git a/src/description/urdf/athena_drive/athena_drive_macro.ros2_control.xacro b/src/description/urdf/athena_drive/athena_drive_macro.ros2_control.xacro index 0779af7..8c891cc 100644 --- a/src/description/urdf/athena_drive/athena_drive_macro.ros2_control.xacro +++ b/src/description/urdf/athena_drive/athena_drive_macro.ros2_control.xacro @@ -111,6 +111,7 @@ + 0.0 @@ -119,6 +120,7 @@ + 0.0 diff --git a/src/simulation/README.md b/src/simulation/README.md index e69de29..7d4c150 100644 --- a/src/simulation/README.md +++ b/src/simulation/README.md @@ -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 +``` \ No newline at end of file diff --git a/src/simulation/launch/bridge.launch.py b/src/simulation/launch/bridge.launch.py index 60d5040..c3ff1ce 100644 --- a/src/simulation/launch/bridge.launch.py +++ b/src/simulation/launch/bridge.launch.py @@ -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', ], ), diff --git a/src/simulation/launch/bringup.launch.py b/src/simulation/launch/bringup.launch.py index 198f2c5..b19be77 100644 --- a/src/simulation/launch/bringup.launch.py +++ b/src/simulation/launch/bringup.launch.py @@ -59,8 +59,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/ ] ) diff --git a/src/simulation/launch/gz_sim.launch.py b/src/simulation/launch/gz_sim.launch.py index 71f0707..575a22a 100644 --- a/src/simulation/launch/gz_sim.launch.py +++ b/src/simulation/launch/gz_sim.launch.py @@ -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'), ] @@ -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 ) ] ) diff --git a/src/simulation/launch/spawn.launch.py b/src/simulation/launch/spawn.launch.py index 4b5bdf0..cf45df6 100644 --- a/src/simulation/launch/spawn.launch.py +++ b/src/simulation/launch/spawn.launch.py @@ -16,18 +16,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, @@ -57,6 +59,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',