ROS Noetic Ninjemys是ROS1最具里程碑式的版本!为什么呢?       使用新立得安装过程更为简洁:     详细安装目录如上图所示。 同时安装了ROS1Noetic和ROS2Foxy,可以参考如下代码进行默认环境选择:  
# ROS 1.0 noetic or ROS 2.0 foxy
echo Hello, ROS 1.0 or ROS 2.0? 1=noetic 2=foxy 
read ROS
if (($ROS==1));then
source /opt/ros/noetic/setup.bash
#export ROS_PACKAGE_PATH=/home/ros/RobTool/ROS1/Wiki/src:/home/relaybot/RobTool/Cozmo/ros/src:$ROS_PACKAGE_PATH
#source /home/ros/RobTool/ROS1/Wiki/devel/setup.bash
#export ROS_MASTER_URI=http://192.168.1.100:11311
#export ROS_IP=192.168.1.100
echo "noetic"
elif (($ROS==2));then
source /opt/ros/foxy/setup.bash
echo "foxy"
else
echo "Non-ROS"
fi
    选择1,并输入roscore:   选择2,并输入ros2:
  • roslaunch gazebo_ros range_world.launch
  此示例可以演示虚拟距离传感器的读数: 距离为0.08 距离为0.48 距离为0.65 range_world.launch  
<?xml version="1.0"?>
<launch>
 
  <!-- these are the arguments you can pass this launch file, for example paused:=true -->
  <arg name="paused" default="false"/>
  <arg name="use_sim_time" default="true"/>
  <arg name="extra_gazebo_args" default=""/>
  <arg name="gui" default="true"/>
  <arg name="debug" default="false"/>
  <arg name="physics" default="ode"/>
  <arg name="verbose" default="true"/>
  <arg name="output" default="screen"/>
  <arg name="world" default="gazebo_ros_range"/>
 
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find gazebo_plugins)/test/test_worlds/$(arg world).world"/>
    <arg name="paused" value="$(arg paused)"/>
    <arg name="use_sim_time" value="$(arg use_sim_time)"/>
    <arg name="extra_gazebo_args" value="$(arg extra_gazebo_args)"/>
    <arg name="gui" value="$(arg gui)"/>
    <arg name="debug" value="$(arg debug)"/>
    <arg name="physics" value="$(arg physics)"/>
    <arg name="verbose" value="$(arg verbose)"/>
    <arg name="output" value="$(arg output)"/>
  </include>
 
</launch>
    再举个例子,kinetic和melodic简单做一些修改就可以直接在noetic中使用的。 比如:     需要版本号为“9”,当然这里是gazebo11,如何办,修改以下为11即可,gazebo各版本之间的兼容性还是很好的。       安装说明在官方文档中已经详细给出,请务必仔细阅读,与之前ROS1有较大改进,更加简洁方便。
Linux和Windows链接如下: Win10:http://wiki.ros.org/Installation/Windows ubuntu:http://wiki.ros.org/noetic/Installation/Ubuntu debian:http://wiki.ros.org/noetic/Installation/Debian Arch:http://wiki.ros.org/noetic/Installation/ArchLinux