ros2增强安全性的设置(重要)

   就是这一句:     echo "export ROS_LOCALHOST_ONLY=1" >> ~/.bashrc

3.2 The ROS_LOCALHOST_ONLY variable

By default, ROS 2 communication is not limited to localhost. ROS_LOCALHOST_ONLY environment variable allows you to limit ROS 2 communication to localhost only. This means your ROS 2 system, and its topics, services, and actions will not be visible to other computers on the local network. Using ROS_LOCALHOST_ONLY is helpful in certain settings, such as classrooms, where multiple robots may publish to the same topic causing strange behaviors. You can set the environment variable with the following command:

export ROS_LOCALHOST_ONLY=1

To maintain this setting between shell sessions, you can add the command to your shell startup script:

echo "export ROS_LOCALHOST_ONLY=1" >> ~/.bashrc

我是在猜测阿,如果使用这个上网,是不是电信整个10.x.x.x网都能够跟我的电脑联系?

你可能感兴趣的:(ros2)