ROS 1和ROS 2同步開發發行,目前最新ROS 1的版本號為M,而ROS 2的版本號為B,ROS 2 Bouncy正式釋出。

目前,ROS packages for Ardent狀態為maintained(186);for Bouncy狀態為developed(63)。

請等待正式釋出。已經正式釋出,2018年7月3日。

參考連結:http://www.ros.org/news/2018/07/ros-2-bouncy-bolson-released.html

ROS 2 Bouncy Bolson支援Ubuntu 18.04, Ubuntu 16.04, Mac OS X 10.12, Windows 10。


----ROS 2 Bouncy Bolson釋出!----機器翻譯----

檢視我們的安裝說明和教程,並試一試!我們很高興聽到您的反饋和此版本將啟用的應用程式!

要了解此版本中的內容,請務必閱讀Bouncy釋出頁面

我們希望在此版本中強調一些功能和改進:

  • 用於處理生命週期狀態和引數的新命令列工具。
  • 採用作為推薦的構建工具。
  • 支援二進位制檔案中所有三個受支援的RMW實現。
  • 針對ROS 2原生rosbag實施的基礎工作。
  • 多個RViz顯示移植到ROS 2。
  • 安全性:除了RTI Connext之外,eProsima Fast-RTPS現在還提供訪問控制支援。
  • 支援ROS 2構建伺服器場上的第三方軟體包提交和“開發工作” 

Bouncy Bolson是第二個非beta版本的ROS 2,將支援錯誤修復和平臺更新(特別是關於滾動依賴關係,如Windows和MacOS)一年,支援將於2019年6月結束。雖然我們的目標是將API保持為儘可能穩定,我們無法保證版本之間的100%API相容性。檢查功能頁面和ROS 2路線圖,以評估ROS 2是否已準備好用於您的應用程式,或者您是否可以從ROS 1切換到ROS 2,因為它將取決於您的用例的確切功能集和要求。

與往常一樣,我們邀請您試用新軟體,提供反饋,報告錯誤和建議功能(並提供程式碼!):https://github.com/ros2/ros2/wiki/Contact我們也邀請您釋出你的ROS 2套餐在Bouncy!這是一個教程

我們還想宣佈下一個ROS 2版本的名稱:Crystal Clemmys

友好的ROS 2團隊

----

ROS 1和ROS 2同步學習推薦:

1. 在Ubuntu 16.04中使用ROS 1 Kinetic和ROS 2 Ardent;

2. 在Ubuntu 18.04中使用ROS 1 Melodic和ROS 2 Bouncy。

下面簡單介紹一下通過Debian Packages安裝ROS 2 Bouncy:

具體內容,推薦參考官網教程:https://github.com/ros2/ros2/wiki/Linux-Install-Debians

根多關於ROS 2的詳細內容參考如下:

1:( https://github.com/ros2/ros2/wiki )

2:( https://github.com/fkromer/awesome-ros2 )

請注意:ROS 2 Bouncy對應Ubuntu Bionic(18.04 LTS);ROS 2 Ardent對應Ubuntu Xenial(16.04 LTS)。

1-設定安裝源

主要分為如下兩步:

1.1

sudo apt update && sudo apt install curl
curl http://repo.ros2.org/repos.key | sudo apt-key add -
----

1.2

sudo sh -c 'echo "deb [arch=amd64,arm64] http://repo.ros2.org/ubuntu/main `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
----

圖示如下:


----

2-安裝ROS 2軟體包

同樣分為如下兩步:

2.1

export ROS_DISTRO=bouncy
----

2.2

舊:

sudo apt update
sudo apt install `apt list "ros-$ROS_DISTRO-*" 2> /dev/null | grep "/" | awk -F/ '{print $1}' | grep -v -e ros-$ROS_DISTRO-ros1-bridge -e ros-$ROS_DISTRO-turtlebot2- | tr "\n" " "`

新:

sudo apt update
sudo apt install `apt list "ros-$ROS_DISTRO-*" 2> /dev/null | \
  grep '/' | awk -F/ '{print $1}' | \
  grep -v -e ros-$ROS_DISTRO-ros1-bridge \
  -e ros-$ROS_DISTRO-turtlebot2- \
  -e "ros-$ROS_DISTRO.*-dbgsym" \
  -e "ros-$ROS_DISTRO-.*opensplice" \
  -e "ros-$ROS_DISTRO-.*connext" | tr '\n' ' '`

----

3-環境設定

ROS 1.0和ROS 2.0並存問題。

source /opt/ros/$ROS_DISTRO/setup.bash

在bash中寫選擇版本的Code即可,效果如下:


----

4-示例測試

4.1 talker-listener

T1:
ros2 run demo_nodes_cpp talker
T2:
ros2 run demo_nodes_py listener


4.2 help


4.3 Launch

# Copyright 2018 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Launch a lifecycle talker and a lifecycle listener."""

import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))  # noqa
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', 'launch'))  # noqa

import launch
import launch.actions
import launch.events

from launch_ros import get_default_launch_description
import launch_ros.actions
import launch_ros.events
import launch_ros.events.lifecycle

import lifecycle_msgs.msg


def main(argv=sys.argv[1:]):
    """Main."""
    ld = launch.LaunchDescription()

    # Prepare the talker node.
    talker_node = launch_ros.actions.LifecycleNode(
        node_name='talker',
        package='lifecycle', node_executable='lifecycle_talker', output='screen')

    # When the talker reaches the 'inactive' state, make it take the 'activate' transition.
    register_event_handler_for_talker_reaches_inactive_state = launch.actions.RegisterEventHandler(
        launch_ros.event_handlers.OnStateTransition(
            target_lifecycle_node=talker_node, goal_state='inactive',
            entities=[
                launch.actions.LogInfo(
                    msg="node 'talker' reached the 'inactive' state, 'activating'."),
                launch.actions.EmitEvent(event=launch_ros.events.lifecycle.ChangeState(
                    lifecycle_node_matcher=launch.events.process.matches_action(talker_node),
                    transition_id=lifecycle_msgs.msg.Transition.TRANSITION_ACTIVATE,
                )),
            ],
        )
    )

    # When the talker node reaches the 'active' state, log a message and start the listener node.
    register_event_handler_for_talker_reaches_active_state = launch.actions.RegisterEventHandler(
        launch_ros.event_handlers.OnStateTransition(
            target_lifecycle_node=talker_node, goal_state='active',
            entities=[
                launch.actions.LogInfo(
                    msg="node 'talker' reached the 'active' state, launching 'listener'."),
                launch_ros.actions.LifecycleNode(
                    node_name='listener',
                    package='lifecycle', node_executable='lifecycle_listener', output='screen'),
            ],
        )
    )

    # Make the talker node take the 'configure' transition.
    emit_event_to_request_that_talker_does_configure_transition = launch.actions.EmitEvent(
        event=launch_ros.events.lifecycle.ChangeState(
            lifecycle_node_matcher=launch.events.process.matches_action(talker_node),
            transition_id=lifecycle_msgs.msg.Transition.TRANSITION_CONFIGURE,
        )
    )

    # Add the actions to the launch description.
    # The order they are added reflects the order in which they will be executed.
    ld.add_action(register_event_handler_for_talker_reaches_inactive_state)
    ld.add_action(register_event_handler_for_talker_reaches_active_state)
    ld.add_action(talker_node)
    ld.add_action(emit_event_to_request_that_talker_does_configure_transition)

    print('Starting introspection of launch description...')
    print('')

    print(launch.LaunchIntrospector().format_launch_description(ld))

    print('')
    print('Starting launch of launch description...')
    print('')

    # ls = LaunchService(argv=argv, debug=True)
    ls = launch.LaunchService(argv=argv)
    ls.include_launch_description(get_default_launch_description(prefix_output_with_name=False))
    ls.include_launch_description(ld)
    return ls.run()


if __name__ == '__main__':
main()


4.4 Run-time Compostion


4.5 image_tools




4.6 tf realtime 稍後補充微笑

4.7 rviz2



4.8 ROS1和ROS2橋接



----

ROS 2 Bouncy使用教程稍後再做補充。

----英文原文----

ROS 2 Bouncy Bolson Released!

We're happy to announce the ROS 2 release Bouncy Bolson!

Check out our installation instructions and tutorials and give it a try! We're excited to hear your feedback and the applications that this release will enable!

To get an idea of what's in this release, be sure to read the Bouncy release page.

A few features and improvements we would like to highlight in this release:

  • New command line tools for working with lifecycle states and parameters.
  • Adoption of colcon as the recommended build tool.
  • Support for all three supported RMW implementations from binaries.
  • Foundational work toward a ROS 2-native rosbag implementation.
  • Multitude of RViz displays ported to ROS 2.
  • Security: Access Control support now available for eProsima Fast-RTPS in addition to RTI Connext.
  • Support for 3rd party package submission and "devel jobs" on the ROS 2 build farm.

Bouncy Bolson is the second non-beta ROS 2 release and will be supported with bug fixes and platform updates (particularly on rolling dependencies like Windows and MacOS) for one year with support ending in June 2019. While we do aim to keep the API as stable as possible, we can't guarantee 100% API compatibility between releases. Check the features page and ROS 2 roadmap to evaluate whether or not ROS 2 is ready to be used for your application or if you can switch from ROS 1 to ROS 2 as it will depend on the exact feature set and requirements of your use case.

As always, we invite you to try out the new software, give feedback, report bugs, and suggest features (and contribute code!): https://github.com/ros2/ros2/wiki/Contact We also invite you to release your ROS 2 packages in Bouncy! Here's a tutorial to do so.

We would also like to announce the name of the next ROS 2 release: Crystal Clemmys

Your friendly ROS 2 Team

P.S. There's still a few days left on the t-shirt campaign.

----

About ROS 2

ROS 2 Tutorials

Advanced

Docker

ROS 2 Demos

ROS 2 Examples

----

ROS 2 Bouncy Bolson (codename 'bouncy'; June 2018)

Welcome to the latest release of ROS 2 software named Bouncy Bolson!

Supported Platforms

This version of ROS 2 is supported on four platforms (see REP 2000):

  • Ubuntu 18.04 (Bionic)
    • Debian packages for amd64 as well as arm64
  • Ubuntu 16.04 (Xenial)
    • no Debian packages but building from source is supported
  • Mac OS X 10.12 (Sierra)
  • Windows 10 with Visual Studio 2017

Binary packages as well as instructions for how to compile from source are provided (see install instructions as well as documentation).

Features

New features in this ROS 2 release

  • New launch system featuring a much more capable and flexible Python API.
  • Parameters can be passed as command line arguments to C++ executables.
  • Various improvements to the Python client library.
  • Support for publishing and subscribing to serialized data.This is the foundation for the upcoming work towards a native rosbag implementation.
  • More command line tools, e.g. for working with parameters and lifecycle states.
  • Binary packages / fat archives support three RMW implementations by default (without the need to build from source):
    • eProsima's FastRTPS (default)
    • RTI's Connext
    • ADLINK's OpenSplice

For an overview of all features available, including those from earlier releases, please see the Features page.

Changes since the Ardent release

Changes since the Ardent Apalone release:

  • The Python package launch has been redesigned.The previous Python API has been moved into a submodule launch.legacy.You can update existing launch files to continue to use the legacy API if a transition to the new Python API is not desired.
  • The ROS topic names containing namespaces are mapped to DDS topics including their namespaces.DDS partitions are not being used anymore for this.
  • The recommended build tool is now colcon instead of ament_tools.This switch has no implications for the code in each ROS 2 package.The install instructions have been updated and the read-the-docs page describes how to map an existing ament_tools call to colcon.

Known Issues

----