Skip to content

Commit

Permalink
remove old robin + world separation
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonR99 committed Jun 20, 2024
1 parent dbb8a59 commit 7436c67
Show file tree
Hide file tree
Showing 27 changed files with 956 additions and 2,929 deletions.
27 changes: 27 additions & 0 deletions src/rove_bringup/launch/sim.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,31 @@ def generate_launch_description():
launch_arguments={'gz_args': "-v 4 -r " + world}.items(),
)

walls_file_path = os.path.join(pkg_rove_description, 'worlds', 'walls.sdf')
spawn_walls = Node(
package='ros_gz_sim',
executable='create',
arguments=['-file', walls_file_path,
'-name', 'walls',
'-x', '0',
'-y', '0',
'-z', '0'],
output='screen',
)

actor_file_path = os.path.join(pkg_rove_description, 'worlds', 'actor.sdf')
spawn_actor = Node(
package='ros_gz_sim',
executable='create',
arguments=['-file', actor_file_path,
'-name', 'actor',
'-topic', 'actor_pose',
'-x', '0',
'-y', '0',
'-z', '0.1'],
output='screen',
)

# Spawn robot
create = Node(
package='ros_gz_sim',
Expand Down Expand Up @@ -82,6 +107,8 @@ def generate_launch_description():
return LaunchDescription([
gz_sim,
bridge,
spawn_walls,
spawn_actor,
robot_state_publisher,
create,
common,
Expand Down
2 changes: 1 addition & 1 deletion src/rove_description/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ find_package(ament_cmake REQUIRED)
# further dependencies manually.
# find_package(<dependency> REQUIRED)
install(
DIRECTORY launch urdf rviz meshes worlds config
DIRECTORY launch urdf rviz meshes worlds config models
DESTINATION share/${PROJECT_NAME}
)
if(BUILD_TESTING)
Expand Down
59 changes: 59 additions & 0 deletions src/rove_description/worlds/actor.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0"?>
<sdf version="1.6">

<actor name="actor">
<pose frame='base_link'>0 0 0 0 0 0</pose>
<collision name='actor_Collision'>
<geometry>
<box>
<size>1 1 2.5</size>
</box>
</geometry>
<pose frame='base_link'>0 0 1.25 0 -0 0</pose>
<max_contacts>10</max_contacts>
<surface>
<contact>
<ode />
</contact>
<bounce />
<friction>
<torsional>
<ode />
</torsional>
<ode />
</friction>
</surface>
</collision>
<skin>
<filename>https://fuel.gazebosim.org/1.0/Mingfei/models/actor/tip/files/meshes/walk.dae</filename>
</skin>
<animation name="animation">
<filename>https://fuel.gazebosim.org/1.0/Mingfei/models/actor/tip/files/meshes/walk.dae</filename>
</animation>
<script>
<trajectory id="0" type="walking">
<waypoint>
<time>0</time> <!-- Move right -->
<pose>2 -9 1 0 0 -1.57</pose>
</waypoint>
<waypoint> <!--Turn
around -->
<time>5</time>
<pose>2 -9 1 0 0 1.57</pose>
</waypoint>
<waypoint> <!-- Move left -->
<time>25</time>
<pose>2 7 1 0 0 1.57</pose>
</waypoint>
<waypoint> <!-- Turn around -->
<time>30</time>
<pose>2 7 1 0 0 -1.57</pose>
</waypoint>
<waypoint>
<time>50</time>
<pose>2 -9 1 0 0 -1.57</pose>
</waypoint>
</trajectory>
</script>
</actor>
</sdf>
Loading

0 comments on commit 7436c67

Please sign in to comment.