Skip to content

Commit ee6465a

Browse files
[odri_bolt_description] Update name of the odri namespace
[odri_bolt_gz] Simulation
1 parent 53c286c commit ee6465a

File tree

8 files changed

+1372
-6
lines changed

8 files changed

+1372
-6
lines changed

Diff for: odri_bolt_description/gazebo/bolt.gazebo.xacro

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on/urdf/rrbot.gazebo
1111
</gazebo>
1212

1313
<gazebo>
14-
<plugin name="gz_ros2_control::GazeboSimROS2ControlPlugin" filename="gz_ros2_control-system">
14+
<plugin name="odri_gz_ros2_control::GazeboOdriSimROS2ControlPlugin" filename="odri_gz_ros2_control-system">
1515
<parameters>$(find odri_bolt_gz)/config/odri_bolt_controllers.yaml</parameters>
1616
<controller_manager_node_name>${prefix}controller_manager</controller_manager_node_name>
1717
</plugin>

Diff for: odri_bolt_description/ros2_control/system_bolt.ros2_control.xacro

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<xacro:if value="$(arg use_gazebo_sim)">
99
<hardware>
10-
<plugin>gz_ros2_control/GazeboOdriSimSystem</plugin>
10+
<plugin>odri_gz_ros2_control/GazeboOdriSimSystem</plugin>
1111
<param name="default_kp">1000.0</param>
1212
<param name="default_kd">10.0</param>
1313
</hardware>

Diff for: odri_bolt_description/urdf/crane.urdf.xacro

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<link name="world"/>
4848

4949
<joint name="fixed" type="fixed">
50-
<origin xyz="0.0 0.0 0.2" rpy="0.0 0.0 0.0"/>
50+
<origin xyz="0.0 0.0 0.6" rpy="0.0 0.0 0.0"/>
5151
<parent link="world"/>
5252
<child link="crane_link"/>
5353
</joint>

Diff for: odri_bolt_gz/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})
77
endforeach()
88

99
install(
10-
DIRECTORY launch config
10+
DIRECTORY launch config world
1111
DESTINATION share/${PROJECT_NAME}
1212
)
1313

Diff for: odri_bolt_gz/config/view_bolt.config

+1,264
Large diffs are not rendered by default.

Diff for: odri_bolt_gz/launch/bolt_gazebo_sim.launch.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from ament_index_python.packages import get_package_share_directory
16+
import os.path
17+
1518
from launch import LaunchDescription
1619
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
1720
from launch.conditions import IfCondition
@@ -61,11 +64,21 @@ def generate_launch_description():
6164
)
6265

6366
# Start Gazebo
67+
68+
pth_odri_bgz_world = os.path.join(get_package_share_directory('odri_bolt_gz'),
69+
'world',
70+
'CloseView.sdf')
71+
pth_odri_bgz_user_cfg = os.path.join(get_package_share_directory('odri_bolt_gz'),
72+
'config',
73+
'view_bolt.config')
74+
6475
gazebo = IncludeLaunchDescription(
6576
PythonLaunchDescriptionSource(
6677
[PathJoinSubstitution([FindPackageShare("ros_gz_sim"), "launch", "gz_sim.launch.py"])]
6778
),
68-
launch_arguments=[("gz_args", [" -r -v 4 empty.sdf"])],
79+
launch_arguments=[("gz_args", [" -r -v 4 " + pth_odri_bgz_world
80+
+ " --gui-config "
81+
+ pth_odri_bgz_user_cfg])],
6982
)
7083

7184
spawn_entity = Node(

Diff for: odri_bolt_gz/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<exec_depend>robot_state_publisher</exec_depend>
1616
<exec_depend>rviz2</exec_depend>
1717
<exec_depend>gazebo_ros</exec_depend>
18-
<exec_depend>gz_ros2_control_odri</exec_depend>
18+
<exec_depend>odri_gz_ros2_control</exec_depend>
1919
<exec_depend>odri_bolt_description</exec_depend>
2020

2121
<export>

Diff for: odri_bolt_gz/world/CloseView.sdf

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<sdf version='1.9'>
2+
<world name='empty'>
3+
<physics name='1ms' type='ignored'>
4+
<max_step_size>0.001</max_step_size>
5+
<real_time_factor>1</real_time_factor>
6+
<real_time_update_rate>1000</real_time_update_rate>
7+
</physics>
8+
<plugin name='gz::sim::systems::Physics' filename='ignition-gazebo-physics-system'/>
9+
<plugin name='gz::sim::systems::UserCommands' filename='ignition-gazebo-user-commands-system'/>
10+
<plugin name='gz::sim::systems::SceneBroadcaster' filename='ignition-gazebo-scene-broadcaster-system'/>
11+
<plugin name='gz::sim::systems::Contact' filename='ignition-gazebo-contact-system'/>
12+
<gravity>0 0 -9.8</gravity>
13+
<magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>
14+
<atmosphere type='adiabatic'/>
15+
<scene>
16+
<ambient>0.4 0.4 0.4 1</ambient>
17+
<background>0.7 0.7 0.7 1</background>
18+
<shadows>true</shadows>
19+
</scene>
20+
<model name='ground_plane'>
21+
<static>true</static>
22+
<link name='link'>
23+
<collision name='collision'>
24+
<geometry>
25+
<plane>
26+
<normal>0 0 1</normal>
27+
<size>100 100</size>
28+
</plane>
29+
</geometry>
30+
<surface>
31+
<friction>
32+
<ode/>
33+
</friction>
34+
<bounce/>
35+
<contact/>
36+
</surface>
37+
</collision>
38+
<visual name='visual'>
39+
<geometry>
40+
<plane>
41+
<normal>0 0 1</normal>
42+
<size>100 100</size>
43+
</plane>
44+
</geometry>
45+
<material>
46+
<ambient>0.8 0.8 0.8 1</ambient>
47+
<diffuse>0.8 0.8 0.8 1</diffuse>
48+
<specular>0.8 0.8 0.8 1</specular>
49+
</material>
50+
</visual>
51+
<pose>0 0 0 0 -0 0</pose>
52+
<inertial>
53+
<pose>0 0 0 0 -0 0</pose>
54+
<mass>1</mass>
55+
<inertia>
56+
<ixx>1</ixx>
57+
<ixy>0</ixy>
58+
<ixz>0</ixz>
59+
<iyy>1</iyy>
60+
<iyz>0</iyz>
61+
<izz>1</izz>
62+
</inertia>
63+
</inertial>
64+
<enable_wind>false</enable_wind>
65+
</link>
66+
<pose>0 0 0 0 -0 0</pose>
67+
<self_collide>false</self_collide>
68+
</model>
69+
<light name='sun' type='directional'>
70+
<pose>0 0 10 0 -0 0</pose>
71+
<cast_shadows>true</cast_shadows>
72+
<intensity>1</intensity>
73+
<direction>-0.5 0.1 -0.9</direction>
74+
<diffuse>0.8 0.8 0.8 1</diffuse>
75+
<specular>0.2 0.2 0.2 1</specular>
76+
<attenuation>
77+
<range>1000</range>
78+
<linear>0.01</linear>
79+
<constant>0.90000000000000002</constant>
80+
<quadratic>0.001</quadratic>
81+
</attenuation>
82+
<spot>
83+
<inner_angle>0</inner_angle>
84+
<outer_angle>0</outer_angle>
85+
<falloff>0</falloff>
86+
</spot>
87+
</light>
88+
</world>
89+
</sdf>

0 commit comments

Comments
 (0)