说明:
步骤:
Domain_ID:0~166,可以安全使用
虚拟机设置网络适配器,选择桥接模式,勾选 复制物理网络连接状态
新建一个cmd命令提示符,执行以下命令
加载ROS2环境
call C:\opt\ros\foxy\x64\local_setup.bat
set ROS_DOMAIN_ID=2
setx ROS_DOMAIN_ID 2
- set | findstr -i ROS
-
-
- ROS_DISTRO=foxy
- ROS_DOMAIN_ID=2
- ROS_ETC_DIR=C:\opt\ros\foxy\x64\etc\ros
- ROS_LOCALHOST_ONLY=0
- ROS_PYTHON_VERSION=3
- ROS_VERSION=2
- SDF_PATH=C:\opt\ros\foxy\x64\share\sdformat\1.6
- VCPKG_ROOT=C:\opt\ros\foxy\x64\tools\vcpkg
- ros2 topic list
-
- /active
- /cmd_vel
- /cmd_vel_mux/input/default
- /cmd_vel_mux/input/joystick
- /cmd_vel_mux/input/keyop
- /cmd_vel_mux/input/navigation
- /cmd_vel_mux/input/remote
- /cmd_vel_mux/input/webapp
- /dynamic_joint_states
- /imu
- /imu/data_raw
- /imu/mag
- /joint_states
- /odom
- /parameter_events
- /robot_description
- /robot_velocity
- /rosout
- /tf
- /tf_static