2026RM仿真

This commit is contained in:
Robofish 2026-03-19 23:32:16 +08:00
parent 368d25494c
commit 589161596d
13 changed files with 227 additions and 10 deletions

View File

@ -3,14 +3,14 @@ source install/setup.bash
commands=( commands=(
"ros2 launch rm_serial_driver rm_serial_driver.launch.py" "ros2 launch rm_serial_driver rm_serial_driver.launch.py"
"ros2 launch rm_decision decision.launch.py" "ros2 launch rm_decision decision.launch.py"
# "ros2 launch rm_simpal_move simple_move.launch.py" "ros2 launch rm_simpal_move simple_move.launch.py"
# "ros2 launch rm_nav_bringup bringup_real.launch.py \ "ros2 launch rm_nav_bringup bringup_sim.launch.py \
# world:=wanzheng \ world:=2026RMUL \
# mode:=mapping \ mode:=mapping \
# lio:=fastlio \ lio:=fastlio \
# lio_rviz:=True \ lio_rviz:=True \
# nav_rviz:=True nav_rviz:=True
# " "
) )
for cmd in "${commands[@]}"; do for cmd in "${commands[@]}"; do

2
sim.sh
View File

@ -5,7 +5,7 @@ commands=(
# "ros2 launch rm_decision decision.launch.py" # "ros2 launch rm_decision decision.launch.py"
"ros2 launch rm_simpal_move simple_move.launch.py" "ros2 launch rm_simpal_move simple_move.launch.py"
"ros2 launch rm_nav_bringup bringup_sim.launch.py \ "ros2 launch rm_nav_bringup bringup_sim.launch.py \
world:=RMUC \ world:=2026RMUL \
mode:=nav \ mode:=nav \
lio:=fastlio \ lio:=fastlio \
localization:=gicp \ localization:=gicp \

Binary file not shown.

View File

@ -7,7 +7,7 @@
filter_size_map: 0.5 filter_size_map: 0.5
cube_side_length: 1000.0 cube_side_length: 1000.0
runtime_pos_log_enable: false runtime_pos_log_enable: false
map_file_path: "src/rm_nav/rm_nav_bringup/PCD/RMUL2026.pcd" map_file_path: "src/rm_nav/rm_nav_bringup/PCD/2026RMUL.pcd"
common: common:
lid_topic: "/livox/lidar" lid_topic: "/livox/lidar"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,7 @@
image: 2026RMUL.pgm
mode: trinary
resolution: 0.05
origin: [-0.921, -6.36, 0]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.25

View File

@ -18,6 +18,7 @@ class WorldType:
RMUC = 'RMUC' RMUC = 'RMUC'
RMUL = 'RMUL' RMUL = 'RMUL'
RMUL2026 = 'RMUL2026' RMUL2026 = 'RMUL2026'
_2026RMUL = '2026RMUL'
def get_world_config(world_type): def get_world_config(world_type):
world_configs = { world_configs = {
@ -42,6 +43,13 @@ def get_world_config(world_type):
'z': '0.063720', 'z': '0.063720',
'yaw': '0.0', 'yaw': '0.0',
'world_path': 'RMUL2026_world/RMUL2026_world.world' 'world_path': 'RMUL2026_world/RMUL2026_world.world'
},
WorldType._2026RMUL: {
'x': '-5.3',
'y': '2.3',
'z': '0.063720',
'yaw': '0.0',
'world_path': '2026RMUL_world/2026RMUL_world.world'
} }
} }
return world_configs.get(world_type, None) return world_configs.get(world_type, None)
@ -155,6 +163,7 @@ def generate_launch_description():
bringup_RMUC_cmd_group = create_gazebo_launch_group(WorldType.RMUC) bringup_RMUC_cmd_group = create_gazebo_launch_group(WorldType.RMUC)
bringup_RMUL_cmd_group = create_gazebo_launch_group(WorldType.RMUL) bringup_RMUL_cmd_group = create_gazebo_launch_group(WorldType.RMUL)
bringup_RMUL2026_cmd_group = create_gazebo_launch_group(WorldType.RMUL2026) bringup_RMUL2026_cmd_group = create_gazebo_launch_group(WorldType.RMUL2026)
bringup_2026RMUL_cmd_group = create_gazebo_launch_group(WorldType._2026RMUL)
# Create the launch description and populate # Create the launch description and populate
ld = LaunchDescription() ld = LaunchDescription()
@ -172,6 +181,7 @@ def generate_launch_description():
ld.add_action(bringup_RMUL_cmd_group) # type: ignore ld.add_action(bringup_RMUL_cmd_group) # type: ignore
ld.add_action(bringup_RMUC_cmd_group) # type: ignore ld.add_action(bringup_RMUC_cmd_group) # type: ignore
ld.add_action(bringup_RMUL2026_cmd_group) # type: ignore ld.add_action(bringup_RMUL2026_cmd_group) # type: ignore
ld.add_action(bringup_2026RMUL_cmd_group) # type: ignore
# Uncomment this line if you want to start RViz # Uncomment this line if you want to start RViz
ld.add_action(start_rviz_cmd) ld.add_action(start_rviz_cmd)

View File

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<model>
<name>2026RMUL_world</name>
<version>1.0</version>
<sdf version="1.7">model.sdf</sdf>
</model>

View File

@ -0,0 +1,45 @@
<?xml version="1.0"?>
<sdf version="1.7">
<model name="2026RMUL">
<static>true</static>
<link name="link">
<visual name="visual">
<pose>0 0 0 1.5705 0 0</pose>
<geometry>
<mesh>
<uri>model://2026RMUL_world/meshes/2026RMUL.STL</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<material>
<lighting>1</lighting>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>0.3 0.3 0.3 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
</material>
</visual>
<collision name="collision">
<pose>0 0 0 1.5705 0 0</pose>
<geometry>
<mesh>
<uri>model://2026RMUL_world/meshes/2026RMUL.STL</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
</ode>
</friction>
</surface>
</collision>
</link>
</model>
</sdf>

View File

@ -0,0 +1,149 @@
<sdf version='1.7'>
<world name='default'>
<model name='ground_plane'>
<static>1</static>
<link name='link'>
<collision name='collision'>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<surface>
<contact>
<collide_bitmask>65535</collide_bitmask>
<ode/>
</contact>
<friction>
<ode>
<mu>100</mu>
<mu2>50</mu2>
</ode>
<torsional>
<ode/>
</torsional>
</friction>
<bounce/>
</surface>
<max_contacts>10</max_contacts>
</collision>
<visual name='visual'>
<cast_shadows>0</cast_shadows>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
</model>
<gravity>0 0 -9.8</gravity>
<magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>
<atmosphere type='adiabatic'/>
<physics type='ode'>
<max_step_size>0.001</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>1000</real_time_update_rate>
</physics>
<scene>
<ambient>0.4 0.4 0.4 1</ambient>
<background>0.7 0.7 0.7 1</background>
<shadows>0</shadows>
</scene>
<model name='2026RMUL'>
<link name='link'>
<inertial>
<mass>1</mass>
<inertia>
<ixx>0.166667</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.166667</iyy>
<iyz>0</iyz>
<izz>0.166667</izz>
</inertia>
</inertial>
<visual name='visual'>
<pose>0 0 0 1.5705 0 0</pose>
<geometry>
<mesh>
<uri>model://2026RMUL_world/meshes/2026RMUL.STL</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<material>
<lighting>1</lighting>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>0.3 0.3 0.3 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
</material>
</visual>
<collision name='collision'>
<pose>0 0 0 1.5705 0 0</pose>
<geometry>
<mesh>
<uri>model://2026RMUL_world/meshes/2026RMUL.STL</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
</ode>
</friction>
</surface>
</collision>
</link>
<static>1</static>
<pose>-6.2 4.2 0 0 0 0</pose>
</model>
<light name='user_directional_light_0' type='directional'>
<pose>0.5 0.5 13 0 -0 0</pose>
<diffuse>0.5 0.5 0.5 1</diffuse>
<specular>0.1 0.1 0.1 1</specular>
<direction>0 0 -1</direction>
<attenuation>
<range>20</range>
<constant>0.5</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<cast_shadows>0</cast_shadows>
</light>
<light name='user_point_light_0' type='point'>
<pose>0.5 0.5 14 0 -0 0</pose>
<diffuse>0.5 0.5 0.5 1</diffuse>
<specular>0.1 0.1 0.1 1</specular>
<attenuation>
<range>20</range>
<constant>0.5</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<cast_shadows>0</cast_shadows>
<direction>0 0 -1</direction>
</light>
<gui fullscreen='0'>
<camera name='user_camera'>
<pose>7.46312 3.78907 13.2486 -2.7e-05 1.5698 1.56647</pose>
<view_controller>orbit</view_controller>
<projection_type>perspective</projection_type>
</camera>
</gui>
</world>
</sdf>