Skip to content

Commit

Permalink
Updated names from ignition gazebo to Gz Sim (space-ros#46)
Browse files Browse the repository at this point in the history
Signed-off-by: Jasmeet Singh <[email protected]>
  • Loading branch information
jasmeet0915 authored and mkhansenbot committed Sep 9, 2024
1 parent 4bde781 commit 15d1202
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
16 changes: 8 additions & 8 deletions mars_rover/launch/mars_rover.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def generate_launch_description():
mars_rover_demos_path = get_package_share_directory('mars_rover')
mars_rover_models_path = get_package_share_directory('simulation')

env = {'IGN_GAZEBO_SYSTEM_PLUGIN_PATH':
':'.join([environ.get('IGN_GAZEBO_SYSTEM_PLUGIN_PATH', default=''),
env = {'GZ_SIM_SYSTEM_PLUGIN_PATH':
':'.join([environ.get('GZ_SIM_SYSTEM_PLUGIN_PATH', default=''),
environ.get('LD_LIBRARY_PATH', default='')]),
'IGN_GAZEBO_RESOURCE_PATH':
':'.join([environ.get('IGN_GAZEBO_RESOURCE_PATH', default=''), mars_rover_demos_path])}
'GZ_SIM_RESOURCE_PATH':
':'.join([mars_rover_demos_path])}

urdf_model_path = os.path.join(mars_rover_models_path, 'models', 'curiosity_path',
'urdf', 'curiosity_mars_rover.xacro')
mars_world_model = os.path.join(mars_rover_demos_path, 'worlds', 'mars_curiosity.world')
Expand Down Expand Up @@ -67,7 +67,7 @@ def generate_launch_description():
)

start_world = ExecuteProcess(
cmd=['ign gazebo', mars_world_model, '-r'],
cmd=['gz sim', mars_world_model, '-r'],
output='screen',
additional_env=env,
shell=True
Expand Down Expand Up @@ -97,7 +97,7 @@ def generate_launch_description():
output='screen')

spawn = Node(
package='ros_ign_gazebo', executable='create',
package='ros_gz_sim', executable='create',
arguments=[
'-name', 'curiosity_mars_rover',
'-topic', robot_description,
Expand All @@ -110,7 +110,7 @@ def generate_launch_description():

## Control Components

component_state_msg = '{name: "IgnitionSystem", target_state: {id: 3, label: ""}}'
component_state_msg = '{name: "GazeboSimSystem", target_state: {id: 3, label: ""}}'

## a hack to resolve current bug
set_hardware_interface_active = ExecuteProcess(
Expand Down
19 changes: 10 additions & 9 deletions mars_rover/worlds/mars_curiosity.world
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
<sdf version="1.5">
<?xml version="1.0" ?>
<sdf version="1.11">
<world name="default">
<gui fullscreen="0">

<plugin filename="GzScene3D" name="3D View">
<ignition-gui>
<gz-gui>
<title>3D View</title>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
</ignition-gui>
</gz-gui>
<engine>ogre2</engine>
<scene>scene</scene>
<background_color>0.9 0.753 0.66</background_color>
<camera_pose>-5.0 0.0 -6.0 0.0 0.0 0.0</camera_pose>
</plugin>

<plugin filename="ImageDisplay" name="Image Display">
<ignition-gui>
<gz-gui>
<property key="state" type="string">floating</property>
</ignition-gui>
</gz-gui>
</plugin>
</gui>

<server_config>
<plugins>
<plugin entity_name="*"
entity_type="world"
filename="ignition-gazebo-scene-broadcaster-system"
name="ignition::gazebo::systems::SceneBroadcaster">
filename="gz-sim-scene-broadcaster-system"
name="gz::sim::systems::SceneBroadcaster">
</plugin>
<plugin entity_name="*"
entity_type="world"
filename="ignition-gazebo-sensors-system"
name="ignition::gazebo::systems::Sensors">
filename="gz-sim-sensors-system"
name="gz::sim::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
</plugins>
Expand Down

0 comments on commit 15d1202

Please sign in to comment.