@@ -25,6 +25,12 @@ def generate_launch_description():
25
25
description = 'Set to "false" to disable joy node.'
26
26
)
27
27
28
+ declare_ovis_origin = DeclareLaunchArgument (
29
+ 'ovis_base_origin' ,
30
+ default_value = '-0.2 0 0.2 0 0 1.57' ,
31
+ description = 'Base origin as "x y z roll pitch yaw"'
32
+ )
33
+
28
34
29
35
30
36
# Retrieve package directories
@@ -36,7 +42,10 @@ def generate_launch_description():
36
42
37
43
# Define paths to URDF and world files
38
44
urdf_path = os .path .join (moveit_pkg_path , 'config' , 'ovis.urdf.xacro' )
39
- robot_desc = ParameterValue (Command (['xacro ' , urdf_path , ' hardware_type:=' , "gazebo" ]), value_type = str )
45
+ robot_desc = ParameterValue (Command (['xacro ' , urdf_path ,
46
+ ' hardware_type:=' , 'gazebo' ,
47
+ ' ovis_base_origin:="' , LaunchConfiguration ('ovis_base_origin' ), '"'
48
+ ]), value_type = str )
40
49
world_file_name = 'worlds/base_world.world'
41
50
world = os .path .join (pkg_ovis_description , world_file_name )
42
51
@@ -93,10 +102,7 @@ def generate_launch_description():
93
102
package = 'ros_gz_sim' ,
94
103
executable = 'create' ,
95
104
arguments = ['-name' , 'ovis' ,
96
- '-topic' , '/ovis/robot_description' ,
97
- '-x' , '0' ,
98
- '-y' , '0' ,
99
- '-z' , '0.1' ],
105
+ '-topic' , '/ovis/robot_description' ],
100
106
output = 'screen'
101
107
)
102
108
@@ -129,6 +135,7 @@ def generate_launch_description():
129
135
return LaunchDescription ([
130
136
declare_with_rove_arg ,
131
137
declare_with_joy_arg ,
138
+ declare_ovis_origin ,
132
139
SetParameter (name = 'use_sim_time' , value = True ),
133
140
static_tf ,
134
141
RegisterEventHandler (
0 commit comments