mirror of
https://github.com/6-robot/wpr_simulation2.git
synced 2025-09-15 12:58:54 +08:00
update slam.launch
This commit is contained in:
parent
1831c23351
commit
93067a076d
@ -50,34 +50,17 @@ def generate_launch_description():
|
||||
)
|
||||
)
|
||||
|
||||
# robot_state_publisher_cmd = IncludeLaunchDescription(
|
||||
# PythonLaunchDescriptionSource(
|
||||
# os.path.join(launch_file_dir, 'robot_state_publisher.launch.py')
|
||||
# ),
|
||||
# launch_arguments={'use_sim_time': use_sim_time}.items()
|
||||
# )
|
||||
|
||||
spawn_robot_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(launch_file_dir, 'spawn_wpb.launch.py')
|
||||
)
|
||||
)
|
||||
|
||||
rviz_cmd = Node(
|
||||
package='rviz2',
|
||||
namespace='',
|
||||
executable='rviz2',
|
||||
name='rviz2',
|
||||
arguments=['-d', [os.path.join(get_package_share_directory('wpr_simulation2'), 'rviz', 'sensor.rviz')]]
|
||||
)
|
||||
|
||||
ld = LaunchDescription()
|
||||
|
||||
# Add the commands to the launch description
|
||||
ld.add_action(gzserver_cmd)
|
||||
ld.add_action(gzclient_cmd)
|
||||
# ld.add_action(robot_state_publisher_cmd)
|
||||
ld.add_action(spawn_robot_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
|
||||
return ld
|
||||
|
||||
@ -27,43 +27,13 @@ from launch_ros.actions import Node
|
||||
|
||||
def generate_launch_description():
|
||||
launch_file_dir = os.path.join(get_package_share_directory('wpr_simulation2'), 'launch')
|
||||
pkg_gazebo_ros = get_package_share_directory('gazebo_ros')
|
||||
|
||||
use_sim_time = LaunchConfiguration('use_sim_time', default='true')
|
||||
|
||||
world = os.path.join(
|
||||
get_package_share_directory('wpr_simulation2'),
|
||||
'worlds',
|
||||
'robocup_home.world'
|
||||
)
|
||||
|
||||
gzserver_cmd = IncludeLaunchDescription(
|
||||
gazebo_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')
|
||||
),
|
||||
launch_arguments={'world': world}.items()
|
||||
)
|
||||
|
||||
gzclient_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py')
|
||||
os.path.join(launch_file_dir, 'robocup_home.launch.py')
|
||||
)
|
||||
)
|
||||
|
||||
spawn_robot_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(launch_file_dir, 'spawn_wpb.launch.py')
|
||||
)
|
||||
)
|
||||
|
||||
# Define the parameters for the SLAM node
|
||||
# slam_params = {
|
||||
# "use_sim_time": True,
|
||||
# "base_frame": "base_footprint",
|
||||
# "odom_frame": "odom",
|
||||
# "map_frame": "map"
|
||||
# }
|
||||
|
||||
slam_cmd = Node(
|
||||
package="slam_toolbox",
|
||||
executable="sync_slam_toolbox_node",
|
||||
@ -76,19 +46,17 @@ def generate_launch_description():
|
||||
)
|
||||
|
||||
rviz_cmd = Node(
|
||||
package='rviz2',
|
||||
namespace='',
|
||||
executable='rviz2',
|
||||
name='rviz2',
|
||||
arguments=['-d', [os.path.join(get_package_share_directory('wpr_simulation2'), 'rviz', 'slam.rviz')]]
|
||||
)
|
||||
package='rviz2',
|
||||
namespace='',
|
||||
executable='rviz2',
|
||||
name='rviz2',
|
||||
arguments=['-d', [os.path.join(get_package_share_directory('wpr_simulation2'), 'rviz', 'slam.rviz')]]
|
||||
)
|
||||
|
||||
ld = LaunchDescription()
|
||||
|
||||
# Add the commands to the launch description
|
||||
ld.add_action(gzserver_cmd)
|
||||
ld.add_action(gzclient_cmd)
|
||||
ld.add_action(spawn_robot_cmd)
|
||||
ld.add_action(gazebo_cmd)
|
||||
ld.add_action(slam_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
|
||||
|
||||
@ -4,9 +4,7 @@ Panels:
|
||||
Name: Displays
|
||||
Property Tree Widget:
|
||||
Expanded:
|
||||
- /Global Options1
|
||||
- /Status1
|
||||
- /RobotModel1
|
||||
- /LaserScan1
|
||||
- /Map1
|
||||
Splitter Ratio: 0.5
|
||||
Tree Height: 684
|
||||
@ -255,18 +253,18 @@ Visualization Manager:
|
||||
Swap Stereo Eyes: false
|
||||
Value: false
|
||||
Focal Point:
|
||||
X: -0.5873717069625854
|
||||
Y: -0.10902519524097443
|
||||
X: -0.5878446698188782
|
||||
Y: 0.014699108898639679
|
||||
Z: -0.666007936000824
|
||||
Focal Shape Fixed Size: true
|
||||
Focal Shape Size: 0.05000000074505806
|
||||
Invert Z Axis: false
|
||||
Name: Current View
|
||||
Near Clip Distance: 0.009999999776482582
|
||||
Pitch: 0.9953979253768921
|
||||
Pitch: 0.9803979396820068
|
||||
Target Frame: <Fixed Frame>
|
||||
Value: Orbit (rviz)
|
||||
Yaw: 3.1354167461395264
|
||||
Yaw: 3.1454169750213623
|
||||
Saved: ~
|
||||
Window Geometry:
|
||||
Displays:
|
||||
@ -274,7 +272,7 @@ Window Geometry:
|
||||
Height: 1376
|
||||
Hide Left Dock: false
|
||||
Hide Right Dock: false
|
||||
QMainWindow State: 000000ff00000000fd000000040000000000000217000004c2fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000337000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000220053006c0061006d0054006f006f006c0062006f00780050006c007500670069006e010000037a000001850000018500ffffff000000010000010f000004c2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d000004c2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000009b60000003efc0100000002fb0000000800540069006d00650100000000000009b6000002fb00fffffffb0000000800540069006d0065010000000000000450000000000000000000000684000004c200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
|
||||
QMainWindow State: 000000ff00000000fd000000040000000000000217000004c2fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000337000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000220053006c0061006d0054006f006f006c0062006f00780050006c007500670069006e010000037a000001850000018500ffffff000000010000010f000004c2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d000004c2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000009ba0000003efc0100000002fb0000000800540069006d00650100000000000009ba000002fb00fffffffb0000000800540069006d0065010000000000000450000000000000000000000688000004c200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
|
||||
Selection:
|
||||
collapsed: false
|
||||
SlamToolboxPlugin:
|
||||
@ -285,6 +283,6 @@ Window Geometry:
|
||||
collapsed: false
|
||||
Views:
|
||||
collapsed: false
|
||||
Width: 2486
|
||||
X: 74
|
||||
Width: 2490
|
||||
X: 70
|
||||
Y: 27
|
||||
|
||||
Loading…
Reference in New Issue
Block a user