Skip to content

Commit

Permalink
gazebo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Dec 10, 2023
1 parent 6e57923 commit 4c334f8
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rover_description/robots/rover.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. -->
</xacro:sensor_imu>

<xacro:sensor_asus_xtion prefix="camera" parent="base_link">
<origin xyz="0.215 0 0.065" rpy="0 0.2 0"/>
<origin xyz="0.215 0 0.065" rpy="0 0.4 0"/>
<!-- <origin xyz="0.212 0 0.065" rpy="0 0 0"/> -->
</xacro:sensor_asus_xtion>

Expand Down
2 changes: 1 addition & 1 deletion rover_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ install(TARGETS
)

install(
DIRECTORY launch worlds models rviz
DIRECTORY launch worlds models rviz config
DESTINATION share/${PROJECT_NAME}
)

Expand Down
3 changes: 3 additions & 0 deletions rover_gazebo/config/gazebo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gazebo:
ros__parameters:
publish_rate: 100.0
6 changes: 5 additions & 1 deletion rover_gazebo/launch/gazebo.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ def generate_launch_description():
PythonLaunchDescriptionSource(
os.path.join(pkg_gazebo_ros, "launch", "gzserver.launch.py")
),
launch_arguments={"world": world, "pause": pause_gz}.items()
launch_arguments={
"world": world,
"pause": pause_gz,
"params_file": os.path.join(pkg_path, "config", "gazebo.yaml"),
}.items()
)

localization_cmd = IncludeLaunchDescription(
Expand Down
2 changes: 1 addition & 1 deletion rover_gazebo/launch/moon.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def generate_launch_description():
),
launch_arguments={"world": os.path.join(
pkg_path, "worlds", "moon.world"),
"initial_pose_z": "2.4"}.items()
"initial_pose_z": "2.11"}.items()
)

ld = LaunchDescription()
Expand Down
4 changes: 2 additions & 2 deletions rover_gazebo/models/moon/model.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<geometry>
<heightmap>
<uri>model://moon/materials/textures/moon.png</uri>
<size>100 100 7</size>
<size>100 100 6</size>
<pos>0 0 0</pos>
</heightmap>
</geometry>
Expand All @@ -22,7 +22,7 @@
<size>1</size>
</texture>
<uri>model://moon/materials/textures/moon.png</uri>
<size>100 100 7</size>
<size>100 100 6</size>
<pos>0 0 0</pos>
</heightmap>
</geometry>
Expand Down
4 changes: 4 additions & 0 deletions rover_gazebo/worlds/moon.world
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<sdf version="1.4">
<world name="default">

<plugin name="gazebo_ros_state" filename="libgazebo_ros_state.so">
<update_rate>1.0</update_rate>
</plugin>

<light name="sun_directional" type="directional">
<cast_shadows>true</cast_shadows>
<pose>200 0 14 0 0 0</pose>
Expand Down

0 comments on commit 4c334f8

Please sign in to comment.