Vmware rehel 8 ip_local_port_range 卡了 prefer different parity for start/end values
时间: 2024-02-27 21:57:08 浏览: 43
这个问题可能与内核参数有关。你可以尝试以下步骤:
1. 在启动时按下 ESC 键,进入 Grub 引导菜单。
2. 选中要启动的内核版本,按下 e 键进入编辑模式。
3. 在编辑模式下,找到以 "linux" 开头的行,并在行末尾添加以下内容:
```
net.ipv4.ip_local_port_range=1024 65535
```
4. 按下 Ctrl + X 或者 F10 键保存并启动内核。
如果以上步骤无法解决问题,你可以尝试修改系统内核参数。具体步骤如下:
1. 打开 /etc/sysctl.conf 文件。
2. 在文件末尾添加以下内容:
```
net.ipv4.ip_local_port_range = 1024 65535
```
3. 保存文件并执行以下命令使之生效:
```
sysctl -p
```
如果你还是无法解决问题,建议你查看启动日志,找到具体的错误信息,以便更好地定位问题。
相关问题
ip_local_port_range: prefer different parity for start/end values.
The `ip_local_port_range` is a kernel parameter that defines the range of local ports that are used for outgoing connections. The default range is usually 32768 to 60999, but it can be changed by modifying the `/proc/sys/net/ipv4/ip_local_port_range` file.
The warning "prefer different parity for start/end values" means that the start and end values of the port range should have different parity (i.e., one should be odd and the other should be even). This is because some applications may not work correctly if both the start and end values are either odd or even.
To fix this warning, you can modify the `ip_local_port_range` parameter to use an odd start value and an even end value (or vice versa). For example:
```
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
```
This will set the start value to 1024 (which is even) and the end value to 65535 (which is odd), avoiding the parity warning.
teb_local_planner如何使用
teb_local_planner是ROS中的一个局部路径规划器,用于生成机器人在环境中的局部路径。以下是使用teb_local_planner的基本步骤:
1. 安装teb_local_planner:
```
sudo apt-get install ros-<distro>-teb-local-planner
```
2. 在机器人的工作空间中创建一个catkin包,并在package.xml中添加如下依赖项:
```
<build_depend>teb_local_planner</build_depend>
<run_depend>teb_local_planner</run_depend>
```
3. 创建一个launch文件,将teb_local_planner配置为全局规划器的子规划器:
```xml
<launch>
<node name="move_base" pkg="move_base" type="move_base" respawn="false" output="screen">
<rosparam file="$(find your_robot_config)/base_local_planner_params.yaml" command="load" />
<rosparam file="$(find your_robot_config)/global_planner_params.yaml" command="load" />
<param name="base_global_planner" value="navfn/NavfnROS" />
<param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" />
</node>
</launch>
```
4. 在机器人配置文件夹下创建一个base_local_planner_params.yaml文件,并在其中添加TebLocalPlannerROS的参数设置。这里提供一个示例:
```yaml
# TEB Local Planner parameters
TrajectoryPlannerROS:
max_vel_x: 0.5
max_rotational_vel: 1.0
min_in_place_rotational_vel: 0.1
escape_vel: -0.1
acc_lim_x: 1.0
acc_lim_th: 1.0
holonomic_robot: false
max_vel_theta: 1.0
min_turning_radius: 0.2
footprint_model: consavable_laser_scan
footprint_padding: 0.1
teb_autosize: true
dt_ref: 0.3
dt_hysteresis: 0.1
min_samples: 3
global_plan_overwrite_orientation: true
allow_init_with_backwards_motion: false
max_global_plan_lookahead_dist: 3.0
force_reinit_new_goal_dist: 1.0
force_reinit_new_goal_angular: 0.2
inscribed_radius: 0.25
circumscribed_radius: 0.3
costmap_converter_plugin: ""
costmap_converter_spin_thread: true
visualize_subsampled_path: false
visualize_voronoi_path: false
visualize_infeasible_points: false
visualize_dynamic_obstacles: false
delete_detours_backwards: false
detours_orientation_tolerance: 0.1
weight_viapoint: 1.0
weight_optimaltime: 1.0
weight_shortest_path: 0.0
viapoints_all_candidates: false
max_number_classes: 0
selection_cost_hysteresis: 0.1
selection_prefer_initial_plan: false
selection_obst_cost_scale: 10.0
selection_viapoint_cost_scale: 1.0
selection_alternative_time_cost: true
selection_dropping_probability: 0.0
selection_dropping_memory: 2
```
5. 启动机器人并运行局部路径规划器:
```
roslaunch your_robot_name teb_local_planner.launch
```
以上是使用teb_local_planner的基本步骤,你需要根据你的机器人配置和任务需求进行相应的参数配置。