-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
179 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!-- | ||
Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
Source of this file are templates in [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository. | ||
Author: Dr. Denis | ||
--> | ||
|
||
<launch> | ||
<arg name="gui" | ||
default="false" | ||
description="Start RViz2 automatically with this launch file."/> | ||
|
||
<!-- Load description and start controllers --> | ||
<let name="robot_description_content" value="$(command '$(find-exec xacro) $(find-pkg-share ros2_control_demo_example_9)/urdf/rrbot.urdf.xacro use_gazebo_sim:=true')" /> | ||
|
||
<node pkg="robot_state_publisher" exec="robot_state_publisher" output="both"> | ||
<param name="robot_description" value="$(var robot_description_content)" /> | ||
<param name="use_sim_time" value="true" /> | ||
</node> | ||
|
||
<!-- Start Gazebo --> | ||
<let name="gazebo_world" value="$(find-pkg-share ros2_control_demo_example_9)/worlds/empty.world" /> | ||
<include file="$(find-pkg-share ros_gz_sim)/launch/gz_sim.launch.py" > | ||
<arg name="gz_args" value=" -r -v 4 $(var gazebo_world)"/> | ||
</include> | ||
|
||
<node pkg="ros_gz_bridge" exec="parameter_bridge" args=" | ||
/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock" | ||
output="screen"> | ||
</node> | ||
|
||
<!-- Create robot in Gazebo --> | ||
<node pkg="ros_gz_sim" exec="create" output="screen" args="-topic /robot_description"/> | ||
|
||
<!-- Start Controllers --> | ||
<!--joint_state_braodcaster_spawner--> | ||
<node pkg="controller_manager" exec="spawner" args="joint_state_broadcaster"> | ||
<param name="use_sim_time" value="true" /> | ||
</node> | ||
<!--Mobile Base Controller--> | ||
<node pkg="controller_manager" exec="spawner" args="forward_position_controller"> | ||
<param name="use_sim_time" value="true" /> | ||
</node> | ||
|
||
<!-- Rviz --> | ||
<node if="$(var gui)" pkg="rviz2" exec="rviz2" output="log" args="-d $(find-pkg-share $(var ros2_control_demo_description))/rrbot/rviz/rrbot.rviz"> | ||
<param name="use_sim_time" value="true" /> | ||
</node> | ||
|
||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" ?> | ||
<sdf version="1.6"> | ||
<world name="empty"> | ||
<physics name="1ms" type="ignored"> | ||
<max_step_size>0.001</max_step_size> | ||
<real_time_factor>1.0</real_time_factor> | ||
</physics> | ||
<plugin | ||
filename="gz-sim-physics-system" | ||
name="gz::sim::systems::Physics"> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-user-commands-system" | ||
name="gz::sim::systems::UserCommands"> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-scene-broadcaster-system" | ||
name="gz::sim::systems::SceneBroadcaster"> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-contact-system" | ||
name="gz::sim::systems::Contact"> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-sensors-system" | ||
name="gz::sim::systems::Sensors"> | ||
<render_engine>ogre2</render_engine> | ||
</plugin> | ||
|
||
<light type="directional" name="sun"> | ||
<cast_shadows>true</cast_shadows> | ||
<pose>0 0 10 0 0 0</pose> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.2 0.2 0.2 1</specular> | ||
<attenuation> | ||
<range>1000</range> | ||
<constant>0.9</constant> | ||
<linear>0.01</linear> | ||
<quadratic>0.001</quadratic> | ||
</attenuation> | ||
<direction>-0.5 0.1 -0.9</direction> | ||
</light> | ||
|
||
<model name="ground_plane"> | ||
<static>true</static> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<plane> | ||
<normal>0 0 1</normal> | ||
<size>100 100</size> | ||
</plane> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<plane> | ||
<normal>0 0 1</normal> | ||
<size>100 100</size> | ||
</plane> | ||
</geometry> | ||
<material> | ||
<ambient>0.8 0.8 0.8 1</ambient> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.8 0.8 0.8 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
</world> | ||
</sdf> |