Coder Social home page Coder Social logo

ros2 / ros1_bridge Goto Github PK

View Code? Open in Web Editor NEW
403.0 31.0 268.0 1.56 MB

ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2

License: Apache License 2.0

CMake 7.90% C++ 60.01% Python 19.12% EmberScript 12.97%
hacktoberfest

ros1_bridge's Introduction

Bridge communication between ROS 1 and ROS 2

This package provides a network bridge which enables the exchange of messages between ROS 1 and ROS 2.

The bridge is currently implemented in C++ as at the time the Python API for ROS 2 had not been developed. Because of this its support is limited to only the message/service types available at compile time of the bridge. The bridge provided with the prebuilt ROS 2 binaries includes support for common ROS interfaces (messages/services), such as the interface packages listed in the ros2/common_interfaces repository and tf2_msgs. See the documentation for more details on how ROS 1 and ROS 2 interfaces are associated with each other. If you would like to use a bridge with other interfaces (including your own custom types), you will have to build the bridge from source (instructions below), after building and sourcing your custom types in separate ROS 1 and ROS 2 workspaces. See the documentation for an example setup.

For efficiency reasons, topics will only be bridged when matching publisher-subscriber pairs are active for a topic on either side of the bridge. As a result using ros2 topic echo <topic-name> doesn't work but fails with an error message Could not determine the type for the passed topic if no other subscribers are present since the dynamic bridge hasn't bridged the topic yet. As a workaround the topic type can be specified explicitly ros2 topic echo <topic-name> <topic-type> which triggers the bridging of the topic since the echo command represents the necessary subscriber. On the ROS 1 side rostopic echo doesn't have an option to specify the topic type explicitly. Therefore it can't be used with the dynamic bridge if no other subscribers are present. As an alternative you can use the --bridge-all-2to1-topics option to bridge all ROS 2 topics to ROS 1 so that tools such as rostopic echo, rostopic list and rqt will see the topics even if there are no matching ROS 1 subscribers. Run ros2 run ros1_bridge dynamic_bridge -- --help for more options.

Prerequisites

In order to run the bridge you need to either:

  • get prebuilt binaries or
  • build the bridge as well as the other ROS 2 packages from source.

After that you can run both examples described below.

For all examples you need to source the environment of the install space where the bridge was built or unpacked to. Additionally you will need to either source the ROS 1 environment or at least set the ROS_MASTER_URI and run a roscore.

The following ROS 1 packages are required to build and use the bridge:

  • catkin
  • roscpp
  • roslaunch (for roscore executable)
  • rosmsg
  • std_msgs
  • as well as the Python package rospkg

To run the following examples you will also need these ROS 1 packages:

  • rosbash (for rosrun executable)
  • roscpp_tutorials
  • rospy_tutorials
  • rostopic
  • rqt_image_view

Prerequisites for the examples in this file

In order to make the examples below portable between versions of ROS, we define two environment variables, ROS1_INSTALL_PATH and ROS2_INSTALL_PATH. These are defined as the paths to the installation location of their respective ROS versions.

If you installed Noetic in the default location, then the definition of ROS1_INSTALL_PATH will be /opt/ros/noetic.

Building the bridge as described below requires you to build all of ROS 2. We assume that you have downloaded it to ~/ros2_rolling, and that is where you plan on building it. In this case, ROS2_INSTALL_PATH will be defined as ~/ros2_rolling/install.

If you've chosen to install either or both versions of ROS somewhere else, you will need adjust the definitions below to match your installation paths.

Because these definitions are used continuously throughout this page, it is useful to add the following lines to your shell startup file (~/.bashrc if you are using bash, ~/.zshrc if you are using zsh). Modify these definitions as appropriate for the versions of ROS that you're using, and for the shell that you're using.

export ROS1_INSTALL_PATH=/opt/ros/noetic
export ROS2_INSTALL_PATH=~/ros2_rolling/install

Note that no trailing '/' character is used in either definition. If you have problems involving paths, please verify that you have the correct path to the installation location, and that you do not have a trailing '/' in either definition.

Building the bridge from source

Before continuing you should have the prerequisites for building ROS 2 from source installed following these instructions.

In the past, building this package required patches to ROS 1, but in the latest releases that is no longer the case. If you run into trouble first make sure you have at least version 1.11.16 of ros_comm and rosbag.

The bridge uses pkg-config to find ROS 1 packages. ROS 2 packages are found through CMake using find_package(). Therefore the CMAKE_PREFIX_PATH must not contain paths from ROS 1 which would overlay ROS 2 packages.

Here are the steps for Linux and OSX.

You should first build everything but the ROS 1 bridge with normal colcon arguments. We don't recommend having your ROS 1 environment sourced during this step as it can add other libraries to the path.

colcon build --symlink-install --packages-skip ros1_bridge

Next you need to source the ROS 1 environment. If you set the ROS1_INSTALL_PATH environment variable as described above, then the following will source the correct setup.bash file.

source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash

The bridge will be built with support for any message/service packages that are on your path and have an associated mapping between ROS 1 and ROS 2. Therefore you must add any ROS 1 or ROS 2 workspaces that have message/service packages that you want to be bridged to your path before building the bridge. This can be done by adding explicit dependencies on the message/service packages to the package.xml of the bridge, so that colcon will add them to the path before it builds the bridge. Alternatively you can do it manually by sourcing the relevant workspaces yourself, e.g.:

# You have already sourced your ROS installation.
# Source your ROS 2 installation:
source ${ROS2_INSTALL_PATH}/setup.bash
# And if you have a ROS 1 overlay workspace, something like:
# . <install-space-to-ros1-overlay-ws>/setup.bash
# And if you have a ROS 2 overlay workspace, something like:
# . <install-space-to-ros2-overlay-ws>/local_setup.bash

Then build just the ROS 1 bridge:

colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure

Note: If you are building on a memory constrained system you might want to limit the number of parallel jobs by setting e.g. the environment variable MAKEFLAGS=-j1.

Example 1: run the bridge and the example talker and listener

The talker and listener can be either a ROS 1 or a ROS 2 node. The bridge will pass the message along transparently.

Note: When you are running these demos make sure to only source the indicated workspaces. You will get errors from most tools if they have both workspaces in their environment.

Example 1a: ROS 1 talker and ROS 2 listener

First we start a ROS 1 roscore:

# Shell A (ROS 1 only):
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
roscore

Then we start the dynamic bridge which will watch the available ROS 1 and ROS 2 topics. Once a matching topic has been detected it starts to bridge the messages on this topic.

# Shell B (ROS 1 + ROS 2):
# Source ROS 1 first:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
# Source ROS 2 next:
source ${ROS2_INSTALL_PATH}/setup.bash
# For example:
# . /opt/ros/dashing/setup.bash
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge

The program will start outputting the currently available topics in ROS 1 and ROS 2 in a regular interval.


Now we start the ROS 1 talker.

# Shell C:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
rosrun rospy_tutorials talker

The ROS 1 node will start printing the published messages to the console.


Now we start the ROS 2 listener from the demo_nodes_cpp ROS 2 package.

# Shell D:
source ${ROS2_INSTALL_PATH}/setup.bash
ros2 run demo_nodes_cpp listener

The ROS 2 node will start printing the received messages to the console.

When looking at the output in shell B there will be a line stating that the bridge for this topic has been created:

created 1to2 bridge for topic '/chatter' with ROS 1 type 'std_msgs/String' and ROS 2 type 'std_msgs/String'

At the end stop all programs with Ctrl-C. Once you stop either the talker or the listener in shell B a line will be stating that the bridge has been torn down:

removed 1to2 bridge for topic '/chatter'

The screenshot shows all the shell windows and their expected content:

ROS 1 talker and ROS 2 listener

Example 1b: ROS 2 talker and ROS 1 listener

The steps are very similar to the previous example and therefore only the commands are described.

# Shell A:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
roscore

# Shell B:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
source ${ROS2_INSTALL_PATH}/setup.bash
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge

Now we start the ROS 2 talker from the demo_nodes_py ROS 2 package.

# Shell C:
source ${ROS2_INSTALL_PATH}/setup.bash
ros2 run demo_nodes_py talker

Now we start the ROS 1 listener.

# Shell D:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
rosrun roscpp_tutorials listener

Example 2: run the bridge and exchange images

The second example will demonstrate the bridge passing along bigger and more complicated messages. A ROS 2 node is publishing images retrieved from a camera and on the ROS 1 side we use rqt_image_view to render the images in a GUI. And a ROS 1 publisher can send a message to toggle an option in the ROS 2 node.

First we start a ROS 1 roscore and the bridge:

# Shell A:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
roscore
# Shell B:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
source ${ROS2_INSTALL_PATH}/install/setup.bash
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge

Now we start the ROS 1 GUI:

# Shell C:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
rqt_image_view /image

Now we start the ROS 2 image publisher from the image_tools ROS 2 package:

# Shell D:
source ${ROS2_INSTALL_PATH}/install/setup.bash
ros2 run image_tools cam2image

You should see the current images in rqt_image_view which are coming from the ROS 2 node cam2image and are being passed along by the bridge.


To exercise the bridge in the opposite direction at the same time you can publish a message to the ROS 2 node from ROS 1. By publishing either true or false to the flip_image topic, the camera node will conditionally flip the image before sending it. You can either use the Message Publisher plugin in rqt to publish a std_msgs/Bool message on the topic flip_image, or run one of the two following rostopic commands:

# Shell E:
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
rostopic pub -r 1 /flip_image std_msgs/Bool "{data: true}"
rostopic pub -r 1 /flip_image std_msgs/Bool "{data: false}"

The screenshot shows all the shell windows and their expected content (it was taken when Indigo was supported - you should use Melodic):

ROS 2 camera and ROS 1 rqt

Example 3: run the bridge for AddTwoInts service

In this example we will bridge a service TwoInts from ros/roscpp_tutorials and AddTwoInts from ros2/roscpp_examples.

While building, ros1_bridge looks for all installed ROS and ROS2 services. Found services are matched by comparing package name, service name and fields in a request and a response. If all names are the same in ROS and ROS2 service, the bridge will be created. It is also possible to pair services manually by creating a yaml file that will include names of corresponding services. You can find more information here.

So to make this example work, please make sure that the roscpp_tutorials package is installed on your system and the environment is set up correctly while you build ros1_bridge.

Launch ROS master

# Shell A:
source ${ROS1_INSTALL_PATH}/setup.bash
roscore -p 11311

Launch dynamic_bridge:

# Shell B:
source ${ROS1_INSTALL_PATH}/setup.bash
source ${ROS2_INSTALL_PATH}/setup.bash
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge

Launch TwoInts server:

# Shell C:
source ${ROS1_INSTALL_PATH}/setup.bash
export ROS_MASTER_URI=http://localhost:11311
rosrun roscpp_tutorials add_two_ints_server

Launch AddTwoInts client:

# Shell D:
source ${ROS2_INSTALL_PATH}/setup.bash
ros2 run demo_nodes_cpp add_two_ints_client

Example 4: bridge only selected topics and services

This example expands on example 3 by selecting a subset of topics and services to be bridged. This is handy when, for example, you have a system that runs most of it's stuff in either ROS 1 or ROS 2 but needs a few nodes from the 'opposite' version of ROS. Where the dynamic_bridge bridges all topics and service, the parameter_bridge uses the ROS 1 parameter server to choose which topics and services are bridged. Note: The service bridge is monodirectional. You must use either services_2_to_1 and/or services_1_to_2 to bridge ROS 2 -> ROS 1 or ROS 1 -> ROS 2 services accordingly. For example, to bridge only the /chatter topic bidirectionally, and the /add_two_ints service from ROS 2 to ROS 1 only, create this configuration file, bridge.yaml:

topics:
  -
    topic: /chatter  # Topic name on both ROS 1 and ROS 2
    type: std_msgs/msg/String  # Type of topic to bridge
    queue_size: 1  # Queue size
services_2_to_1:
  -
    service: /add_two_ints  # ROS 1 service name
    type: roscpp_tutorials/TwoInts  # The ROS 1 service type name

Start a ROS 1 roscore:

# Shell A (ROS 1 only):
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
roscore

Then load the bridge.yaml config file and start the talker to publish on the /chatter topic:

Shell B: (ROS 1 only):
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash
rosparam load bridge.yaml

rosrun rospy_tutorials talker
Shell C: (ROS 1 only):
source ${ROS1_INSTALL_PATH}/setup.bash
# Or, on OSX, something like:
# . ~/ros_catkin_ws/install_isolated/setup.bash

rosrun roscpp_tutorials add_two_ints_server

Then, in a few ROS 2 terminals:

# Shell D:
source ${ROS2_INSTALL_PATH}/setup.bash
ros2 run ros1_bridge parameter_bridge

If all is well, the logging shows it is creating bridges for the topic and service and you should be able to call the service and listen to the ROS 1 talker from ROS 2:

# Shell E:
source ${ROS2_INSTALL_PATH}/setup.bash
ros2 run demo_nodes_cpp listener

This should start printing text like I heard: [hello world ...] with a timestamp.

# Shell F:
source ${ROS2_INSTALL_PATH}/setup.bash
ros2 service call /add_two_ints example_interfaces/srv/AddTwoInts "{a: 1, b: 2}"

If all is well, the output should contain example_interfaces.srv.AddTwoInts_Response(sum=3)

Parametrizing Quality of Service

An advantage of ROS 2 over ROS 1 is the possibility to define different Quality of Service settings per topic. The parameter bridge optionally allows for this as well. For some topics, like /tf_static this is actually required, as this is a latching topic in ROS 1. In ROS 2 with the parameter_bridge, this requires that topic to be configured as such:

topics:
  -
    topic: /tf_static
    type: tf2_msgs/msg/TFMessage
    queue_size: 1
    qos:
      history: keep_all
      durability: transient_local

All other QoS options (as documented here in https://docs.ros.org/en/foxy/Concepts/About-Quality-of-Service-Settings.html) are available:

topics:
  -
    topic: /some_ros1_topic
    type: std_msgs/msg/String
    queue_size: 1
    qos:
      history: keep_last  # OR keep_all, then you can omit `depth` parameter below
      depth: 10  # Only required when history == keep_last
      reliability: reliable  # OR best_effort
      durability: transient_local  # OR volatile
      deadline:
          secs: 10
          nsecs: 2345
      lifespan:
          secs: 20
          nsecs: 3456
      liveliness: liveliness_system_default  # Values from https://design.ros2.org/articles/qos_deadline_liveliness_lifespan.html, eg. LIVELINESS_AUTOMATIC
      liveliness_lease_duration:
          secs: 40
          nsecs: 5678

Note that the qos section can be omitted entirely and options not set are left default.

ros1_bridge's People

Contributors

christophebedard avatar clalancette avatar cyrilleberger avatar dbking77 avatar dhood avatar dirk-thomas avatar esteve avatar gbiggs avatar gerkey avatar hidmic avatar ivanpauno avatar jacobperron avatar karsten1987 avatar loyvanbeek avatar mabelzhang avatar methyldragon avatar mikaelarguedas avatar mjcarroll avatar nuclearsandwich avatar paulbovbel avatar quarkytale avatar sloretz avatar sservulo avatar suddrey-qut avatar tfoote avatar thom747 avatar timple avatar vicidel avatar wjwwood avatar xlla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ros1_bridge's Issues

Assess how much memory is needed to build the bridge

Right now the bridge instructions tell to build with -j2. Since the bridge has been refactored to have a separate compilation unit per message package, it would be valuable to assess how much memory is needed (at most) to build a message package. We could then update the build instructions accordingly for users to decide which flag is the most adapted to their setup.

dynamic_bridge problem with unstable listener

Bug report

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • source
  • Version or commit hash:
    • current master
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):

Steps to reproduce issue

I am able to reproduce it using example from README. Start dynamic_bridge, run ROS1 talker and ROS2 listener. Then CTRL+C on listener and run it again. After few such cycles listener no longer prints any message. If you look at the ros2 topic echo you can see that there's nothing on the ROS2 topic.

This is what bridge outputs:

xxx@xxx:~/ros2_ws$ ros2 run ros1_bridge dynamic_bridge
created 1to2 bridge for topic '/chatter' with ROS 1 type 'std_msgs/String' and ROS 2 type 'std_msgs/String'
[INFO] [ros1_bridge]: Passing message from ROS 1 std_msgs/String to ROS 2 std_msgs/String (showing msg only once per type)
removed 1to2 bridge for topic '/chatter'
created 1to2 bridge for topic '/chatter' with ROS 1 type 'std_msgs/String' and ROS 2 type 'std_msgs/String'

Expected behavior

Bridge should be able to recover from network problems

Actual behavior

Bridge stops passing messages from ROS1 to ROS2

Bridge appears incapable of bridging ROS1 /clock to ROS2

In ROS1 the rosgraph_msgs/Clock message consists of a time type internally, but in ROS2 the /clock topic is a builtin_interfaces/Time. It does not appear that the bridge can handle bridging this topic from ROS1 to ROS2.

Is there a way to force the bridge to handle this kind of conversion or should a special case be added to the bridge to allow for sim time and bag file playback?

Support field mapping for packages/messages having different names?

Currently the docs example for field mapping rules gives the following example:

-
  ros1_package_name: 'pkg_name'
  ros1_message_name: 'msg_name'
  ros2_package_name: 'pkg_name'
  ros2_message_name: 'msg_name'
  fields_1_to_2:
    foo: 'foo'
    ros1_bar: 'ros2_bar'

Is it intentional that we do not support defining mapping with either different pkg_name, different message names or both ?

In other words should the following be valid?

-
  ros1_package_name: 'ros1_pkg_name'
  ros1_message_name: 'ros1_msg_name'
  ros2_package_name: 'ros2_pkg_name'
  ros2_message_name: 'ros2_msg_name'
  fields_1_to_2:
    foo: 'foo'
    ros1_bar: 'ros2_bar'

crash in map lookup

I get the following crash in dynamic_bridge when I shut down my sender:

failed to create 2to1 bridge for topic 'map' with ROS 2 type '����' and ROS 1 type 'nav_msgs/OccupancyGrid': No template specialization for the pair
check the list of supported pairs with the `--print-pairs` option
created 2to1 bridge for topic 'map' with ROS 2 type 'nav_msgs/OccupancyGrid' and ROS 1 type 'nav_msgs/OccupancyGrid'

OccupancyGrid works fine for some period of time before the failure. The memory for the string used as the map key is somehow getting trampled. Hence the weird characters in the type name. Note: I've been using the opensplice middleware (so that could be the trampler).

Can't pass the custom message from ROS1 to ROS2.

I've created custom message:

string name
string description

It's the same in ROS1 and ROS2 and remains in the same package 'skynet_msgs'
I've created yaml file as explained and added it to ros1_bridge/package.xml:

-
  ros1_package_name: 'skynet_msgs'
  ros2_package_name: 'skynet_msgs'

Here is my ros1_bridge/CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.3)

project(ros1_bridge)

if(NOT WIN32)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra")
endif()

find_package(rmw REQUIRED)

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rmw_implementation_cmake REQUIRED)
find_package(std_msgs REQUIRED)
find_package(skynet_msgs REQUIRED)

# find ROS 1 packages
include(cmake/find_ros1_package.cmake)

find_package(PkgConfig)
if(NOT PKG_CONFIG_FOUND)
  message(STATUS "Failed to find PkgConfig, skipping...")
  # call ament_package() to avoid ament_tools treating this as a plain CMake pkg
  ament_package()
  return()
endif()

find_ros1_package(roscpp)
if(NOT ros1_roscpp_FOUND)
  message(STATUS "Failed to find ROS 1 roscpp, skipping...")
  # call ament_package() to avoid ament_tools treating this as a plain CMake pkg
  ament_package()
  return()
endif()

find_ros1_package(std_msgs REQUIRED)
find_ros1_package(skynet_msgs REQUIRED)

set(TEST_ROS1_BRIDGE FALSE)
if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  find_package(diagnostic_msgs REQUIRED)
  find_ros1_package(diagnostic_msgs)
  find_ros1_package(roslaunch)
  ament_lint_auto_find_test_dependencies()
  if(ros1_diagnostic_msgs_FOUND AND ros1_roslaunch_FOUND)
    set(TEST_ROS1_BRIDGE TRUE)
  endif()
endif()

ament_export_include_directories(include)

ament_python_install_package(${PROJECT_NAME})

ament_package()

set(generated_path "${CMAKE_BINARY_DIR}/generated")
set(generated_files "${generated_path}/get_factory.cpp")
list(APPEND generated_files "${generated_path}/get_mappings.cpp")

# generate per package compilation units to keep the memory usage low
ament_index_get_resources(message_packages "rosidl_interfaces")
foreach(message_package ${message_packages})
  find_package(${message_package} REQUIRED)
  list(APPEND generated_files "${generated_path}/${message_package}_factories.cpp")
endforeach()

add_custom_command(
  OUTPUT ${generated_files}
  COMMAND ${PYTHON_EXECUTABLE} bin/ros1_bridge_generate_factories
    --output-path "${generated_path}" --template-dir resource
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

if(NOT WIN32)
  # ignore warning in ROS 1 message headers
  set_source_files_properties(${generated_files}
    PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter")
endif()

include_directories(include ${generated_path})

function(custom_executable target)
  cmake_parse_arguments(
    ARG "ROS1_DEPENDENCIES" "" "TARGET_DEPENDENCIES" ${ARGN})

  add_executable(${target}${target_suffix}
    ${ARG_UNPARSED_ARGUMENTS})
  ament_target_dependencies(${target}${target_suffix}
    "rclcpp${target_suffix}"
    ${ARG_TARGET_DEPENDENCIES})
  if(ARG_ROS1_DEPENDENCIES)
    ament_target_dependencies(${target}${target_suffix}
      "ros1_roscpp"
      "ros1_std_msgs"
      "ros1_skynet_msgs")
  endif()
  if(ARG_DEPENDENCIES)
    add_dependencies(${target}${target_suffix} ${ARG_DEPENDENCIES})
  endif()

  install(TARGETS ${target}${target_suffix}
    DESTINATION bin)
endfunction()

macro(targets)
  if(NOT "${target_suffix} " STREQUAL " ")
    get_rclcpp_information("${rmw_implementation}" "rclcpp${target_suffix}")
  endif()

  custom_executable(simple_bridge_1_to_2 "src/simple_bridge_1_to_2.cpp"
    ROS1_DEPENDENCIES
    TARGET_DEPENDENCIES "std_msgs" "skynet_msgs")
  custom_executable(simple_bridge_2_to_1 "src/simple_bridge_2_to_1.cpp"
    ROS1_DEPENDENCIES
    TARGET_DEPENDENCIES "std_msgs" "skynet_msgs")

  custom_executable(simple_bridge "src/simple_bridge.cpp"
    ROS1_DEPENDENCIES
    TARGET_DEPENDENCIES "std_msgs" "skynet_msgs")

  add_library(${PROJECT_NAME}${target_suffix} SHARED
    "src/convert_builtin_interfaces.cpp"
    ${generated_files})
  ament_target_dependencies(${PROJECT_NAME}${target_suffix}
    "rclcpp${target_suffix}"
    ${message_packages}
    "ros1_roscpp"
    "ros1_std_msgs"
    "ros1_skynet_msgs")

  install(TARGETS ${PROJECT_NAME}${target_suffix}
    ARCHIVE DESTINATION lib
    LIBRARY DESTINATION lib
    RUNTIME DESTINATION bin)

  custom_executable(static_bridge
    "src/static_bridge.cpp"
    ROS1_DEPENDENCIES
    TARGET_DEPENDENCIES ${message_packages})
  target_link_libraries(static_bridge${target_suffix}
    ${PROJECT_NAME}${target_suffix})

  custom_executable(dynamic_bridge
    "src/dynamic_bridge.cpp"
    ROS1_DEPENDENCIES
    TARGET_DEPENDENCIES ${message_packages})
  target_link_libraries(dynamic_bridge${target_suffix}
    ${PROJECT_NAME}${target_suffix})

  if(TEST_ROS1_BRIDGE AND NOT "${target_suffix}" STREQUAL "")
    custom_executable(test_ros2_client_cpp "test/test_ros2_client.cpp")
    ament_target_dependencies("test_ros2_client_cpp${target_suffix}" "ros1_roscpp" "diagnostic_msgs")
    custom_executable(test_ros2_server_cpp "test/test_ros2_server.cpp")
    ament_target_dependencies("test_ros2_server_cpp${target_suffix}" "ros1_roscpp" "diagnostic_msgs")

    set(TEST_BRIDGE_DYNAMIC_BRIDGE "${CMAKE_INSTALL_PREFIX}/bin/dynamic_bridge${target_suffix}")
    set(TEST_BRIDGE_ROS2_CLIENT "$")
    set(TEST_BRIDGE_ROS2_SERVER "$")
    set(TEST_BRIDGE_RMW ${rmw_implementation})

    configure_file(
      test/test_dynamic_bridge.py.in
      test_dynamic_bridge${target_suffix}.py.genexp
      @ONLY
    )
    file(GENERATE
      OUTPUT test_dynamic_bridge${target_suffix}_$.py
      INPUT test_dynamic_bridge${target_suffix}.py.genexp)
    ament_add_nose_test(test_dynamic_bridge${target_suffix}
      "${CMAKE_CURRENT_BINARY_DIR}/test_dynamic_bridge${target_suffix}_$.py"
      TIMEOUT 60)
  endif()
endmacro()

if(TEST_ROS1_BRIDGE)
  add_executable(test_ros1_client "test/test_ros1_client.cpp")
  ament_target_dependencies(test_ros1_client "ros1_roscpp")
  add_executable(test_ros1_server "test/test_ros1_server.cpp")
  ament_target_dependencies(test_ros1_server "ros1_roscpp")
  set(TEST_BRIDGE_ROS1_ENV "${ros1_roslaunch_PREFIX}/env.sh")
  set(TEST_BRIDGE_ROSCORE "${ros1_roslaunch_PREFIX}/bin/roscore")
  set(TEST_BRIDGE_ROS1_CLIENT "$")
  set(TEST_BRIDGE_ROS1_SERVER "$")
endif()

call_for_each_rmw_implementation(targets GENERATE_DEFAULT)

install(
  FILES skynet_rules.yaml
  DESTINATION share/${PROJECT_NAME})
install(
  PROGRAMS bin/ros1_bridge_generate_factories
  DESTINATION lib/ros1_bridge_generate_factories
)
install(
  DIRECTORY cmake
  DESTINATION share/${PROJECT_NAME}
)
install(
  DIRECTORY include/
  DESTINATION include
)
install(
  DIRECTORY resource
  DESTINATION share/${PROJECT_NAME}
)

I've created publisher and subscriber nodes for ROS1 and ROS2. They pass the message fine between each other inside when work inside ROS1 or ROS2 only.
When I start roscore and dynamic bridge and I start subscriber on ROS1 and publisher on ROS2.
Message is not passed. Dynamic bridge says:

failed to create 2to1 bridge for topic 'description_msgs_test' with ROS 2 type 'skynet_msgs/NodeDescription' and ROS 1 type '': No template specialization for the pair
failed to create 2to1 bridge for topic 'description_msgs_test' with ROS 2 type 'skynet_msgs/NodeDescription' and ROS 1 type '': No template specialization for the pair
failed to create 2to1 bridge for topic 'description_msgs_test' with ROS 2 type 'skynet_msgs/NodeDescription' and ROS 1 type '': No template specialization for the pair

Could you hint what I missed?

Bug in create_bridge_from_*_to_* functions

Hi,

I think there might be a bug in bridge.hpp in functions create_bridge_from_2_to_1 and create_bridge_from_1_to_2. The function create_bridge_from_2_to_1 is called when there is a ROS2 publisher and ROS1 subscriber (as the name suggests) and it is also called in my scenario where ROS2 node only publishes and ROS1 node only receives. However, this functions creates ROS2 subscriber and ROS1 publisher. Shouldn't it be the other way around?

I run into this problem, because I keep on getting this error, when ros1_bridge creates publishers/subscribers:

type support implementation 'introspection_cpp'(0x7f5103ec7669) does not match rmw implementation 'opensplice_static'(0x7f5104fca659)

I build ROS2 only with OpenSplice implementation so I don't understand why there is a mismatch. Do you have any ideas?

Dockerfiles:

Thanks and regards,
Rafał

[dynamic_bridge] could not get topic names and types: not implemented

I am following this tutorial for launching the ros1 bridge. It terminates with a RMW error:

~/ros2_ws$ dynamic_bridge
terminate called after throwing an instance of 'std::runtime_error'
  what():  could not get topic names and types: not implemented, at /home/karsten/ros2_ws/src/eProsima/ROS-RMW-Fast-RTPS-cpp/rmw_fastrtps_cpp/src/functions.cpp:1775
Aborted (core dumped)

Am I doing anything wrong?

Dynamic bridge based on currently available topics

The dynamic bridge will look at the available topics at runtime and bridge topics when matching topic names and types are found. The supported message types will still be limited to the message definitions available at compile time of the bridge.

  • Check ROS 1 master for current topics and associated publishers / subscribers: 2a08207
  • Check ROS 2 information about current DDS topics, this requires parts of ros2/ros2#64

segfault on dynamic_bridge

When following this tutorial, I get a reliable segfault during playback of data from rosbag. Here's the backtrace:

#0  0x00007fc1a073523a in eprosima::fastrtps::rtps::ReaderProxy::set_change_to_status(eprosima::fastrtps::rtps::CacheChange_t const*, eprosima::fastrtps::rtps::ChangeForReaderStatus_t) () from /home/gerkey/ros2_ws/install/lib/libfastrtps.so
[Current thread is 1 (Thread 0x7fc190ff9700 (LWP 8184))]
(gdb) bt
#0  0x00007fc1a073523a in eprosima::fastrtps::rtps::ReaderProxy::set_change_to_status(eprosima::fastrtps::rtps::CacheChange_t const*, eprosima::fastrtps::rtps::ChangeForReaderStatus_t) () from /home/gerkey/ros2_ws/install/lib/libfastrtps.so
#1  0x00007fc1a0731d25 in eprosima::fastrtps::rtps::StatefulWriter::send_any_unsent_changes() ()
   from /home/gerkey/ros2_ws/install/lib/libfastrtps.so
#2  0x00007fc1a072a888 in eprosima::fastrtps::rtps::AsyncWriterThread::run() ()
   from /home/gerkey/ros2_ws/install/lib/libfastrtps.so
#3  0x00007fc1a40fdc80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007fc1aa01d70a in start_thread (arg=0x7fc190ff9700) at pthread_create.c:333
#5  0x00007fc1a3b6c82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

I'll play with it more, including trying to get a backtrace in debug mode.

create publisher even without subscriber

The dynamic bridge polls both sides A and B and only when a publisher is present on side A and a subscriber is present on side B it creates a bridge. That bridge then consists of a subscriber on the side A and a publisher on the side B.

For some use cases like showing available topics in a user interface to choose from this doesn't work since there is no subscriber on the side B / the user interface yet.

Using the option --bridge-all-topics isn't a good alternative either since that results in potentially many more message to be transferred from the publisher on side A to the bridge (even when not being subscribed to on side B). Also if the publisher perform conditional computations based on the presence of any subscriber the bridge might increase the resource usage unnecessarily.

One option to get the best of both approaches would be to already create the publisher in the bridge for side B when there is a publisher on the side A. By not creating a subscriber in the bridge for side A yet (while there is no subscriber on the side B) no overhead is generated but the available publishers are introspectable from the side B.

terminate called after throwing an instance of 'std::runtime_error'

Hello,

I am now testing the ros1_bridge, I compiled the project by myself.

However, after I type the command "ros1_bridge_listener" the following message just shows up:

terminate called after throwing an instance of 'std::runtime_error'
  what():  could not create subscription: type support implementation 'introspection_cpp'(0x7fcbc1e2d669) does not match rmw implementation 'opensplice_static'(0x7fcbc04b4659), at /home/shengwen-asus/ros2_ws/src/ros2/rmw_opensplice/rmw_opensplice_cpp/src/rmw_subscription.cpp:66, at /home/shengwen-asus/ros2_ws/src/ros2/rcl/rcl/src/rcl/subscription.c:76
Aborted

Environment:

  • ROS2 alpha7
  • Ubuntu 16.04 (x64)

Could you guys give me any help?

too much console output

I don't think the dynamic_bridge needs to continually spew "Passing message from ROS2 to ROS1". The message would be more useful if it included the message topic and type. However, I think we would do better to aggregate those messages and output something every five seconds saying how many of each message topic/type went which direction.

Problem with custom messages

Hi,

I have three types of custom messages and I am trying send them between ROS1 and ROS2 nodes. However, I keep on getting those errors:

failed to create 1to2 bridge for topic 'robot_robot_alarm' with ROS 1 type 'messages/RobotAlarm' and ROS 2 type 'messages/RobotAlarm': No template specialization for the pair
failed to create 1to2 bridge for topic 'robot_robot_control' with ROS 1 type 'messages/RobotControl' and ROS 2 type 'messages/RobotControl': No template specialization for the pair
failed to create 2to1 bridge for topic 'robot_robot_sensor' with ROS 2 type 'messages/RobotSensor' and ROS 1 type '': No template specialization for the pair

I suspect that ros2/ros1_bridge cannot see ros1 messages. Before building ros2 I build and install ros messages like this:

source /opt/ros/kinetic/setup.bash
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/ros/kinetic/ ..
make
make install

And all files seem to be correctly installed in /opt/ros/kinetic. What do I do incorrectly?

Messages for ros: https://github.com/piappl/ros2_benchmarking/tree/master/comm/ros1node/messages
Messages for ros2 https://github.com/piappl/ros2_benchmarking/tree/master/comm/ros2node/messages
Docker file for ros1_bridge: https://github.com/piappl/ros2_benchmarking/blob/master/docker/ros2_bridge/Dockerfile

Thanks!
Rafał

Unexpected AF_INET Problems

Running the bridge with both fastRTPS and connexts leads to the same behavior after a large amount of messages (consistently ~950 for connext, ~1100 for fastRTPS):

Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]
Couldn't find an AF_INET address for [machina.local]

This is built on top of master.


connect to ros2/rmw_fastrtps#127

Error on start of ros1_bridge_listener

terminate called after throwing an instance of std::runtime_error:

what():  could not create subscription: type support implementation 'introspection_cpp'(0x7f59fceae669) does not match rmw implementation 'opensplice_static'(0x7f59fb535659), at /home/rohan/ros2_ws/src/ros2/rmw_opensplice/rmw_opensplice_cpp/src/rmw_subscription.cpp:66, at /home/rohan/ros2_ws/src/ros2/rcl/rcl/src/rcl/subscription.c:76
Aborted (core dumped)

Running on xenial with ROS kinetic, and ROS2 alpha7.
I compiled ROS2 from source, and disabled fastrtps, so I only have opensplice.

Opensplice service server does not create bridge

Bug report

When dynamic_bridge is run using rmw_opensplice_cpp, a bridge is not created when a service server is run on the ros2 side and service client is run on ros1 side. This behavior works as expected with rmw_fastrtps_cpp and rmw_connext_cpp.

Required Info:

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • From source
  • Version or commit hash:
    • master
  • DDS implementation:
    • opensplice
  • Client library (if applicable):
    • Either rclpy or rclpp

Steps to reproduce issue

replace source files with your workspace directories
Terminal 1

. ~/ros2_ws/install/setup.bash
.  /opt/ros/melodic/setup.bash
roscore

Terminal 2

. ~/ros2_ws/install/setup.bash
.  /opt/ros/melodic/setup.bash
RMW_IMPLEMENTATION=rmw_opensplice_cpp ros2 run ros1_bridge dynamic_bridge

Terminal 3

. ~/ros2_ws/install/setup.bash
RMW_IMPLEMENTATION=rmw_opensplice_cpp ros2 run demo_nodes_cpp add_two_ints_server

Terminal 4

.  /opt/ros/melodic/setup.bash
rosrun roscpp_tutorials add_two_ints_client

Expected behavior

  • dyanmic_bridge prints ```Create 1 to 2 bridge for service /add_to_ints
  • Client prints Sum: 9

Actual behavior

Nothing is printed by dynamic_bridge and service server, service client prints [ERROR] [time]: Failed to call service add_two_ints

Additional Information

  • May be related to ros2/ros2cli#106
  • Timing does NOT matter (can run bridge, server, and client in any order and error still occurs)

Packaging jobs failing to find 'builtin_interfaces'

Our linux packaging jobs (the only ones that build the bridge) failed overnight with the following CMake error:

Starting >>> ros1_bridge
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found rmw: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/rmw/cmake)
-- Found PythonInterp: /home/rosbuild/ci_scripts/venv/bin/python3 (found suitable version "3.6.5", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /home/rosbuild/ci_scripts/venv/bin/python3
-- Found rclcpp: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/rclcpp/cmake)
-- Found rmw_implementation_cmake: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/rmw_implementation_cmake/cmake)
-- Using RMW implementation 'rmw_fastrtps_cpp' as default
-- Found rmw_fastrtps_cpp: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/rmw_fastrtps_cpp/cmake)
-- Found fastrtps_cmake_module: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/fastrtps_cmake_module/cmake)
-- Found FastRTPS: /home/rosbuild/ci_scripts/ws/install/include  
-- Found std_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/std_msgs/cmake)
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'roscpp'
--   Found roscpp, version 1.14.2
-- Checking for module 'std_msgs'
--   Found std_msgs, version 0.5.11
-- Checking for module 'actionlib_msgs'
--   Found actionlib_msgs, version 1.12.6
-- Checking for module 'builtin_interfaces'
--   No package 'builtin_interfaces' found
CMake Error at /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:415 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:593 (_pkg_check_modules_internal)
  cmake/find_ros1_package.cmake:29 (pkg_check_modules)
  CMakeLists.txt:47 (find_ros1_package)


-- Configuring incomplete, errors occurred!

Four builds failed the same way: (linux, arm) x (xenial, bionic).
An observation that I've made so far is that the four all used the docker cache for each step of the docker build process. The cache invalidation via the today_str injection doesn't appear to be in the packaging jobs. I'll add that and hope that that's enough to fix it (maybe some outdated deps), and if not we can investigate the actual cause.

Bidirectional bridge duplicating messages with FastRTPS

I've been trying out ROS 2 and I'm seeing unexpected behavior when using the bridge.

The following image shows three messages being sent; First without any bridge, then with a FastRTPS-bridge and finally with a OpenSplice-bridge.

The static_bridge with FastRTPS passes a message from Ros 1 to Ros 2, but also back from ROS 2 to ROS 1, even though there was no ROS 2 process running (except for the bridge).
The same scenario with OpenSplice only passes the message from ROS 1 to ROS 2, as expected.

static_bridge_fastrtps_and_opensplice

Melodic support complicated by new rosbag dependencies

rosbag has added support for encryption in melodic, which brings in a python dependency on Crypto, which @mikaelarguedas noticed was causing issues building the bridge on bionic, even if the Crypto dependency is installed in the virtualenv on CI:

--- stderr: ros1_bridge
Traceback (most recent call last):
  File "bin/ros1_bridge_generate_factories", line 11, in <module>
    from ros1_bridge import generate_cpp
  File "/home/rosbuild/ci_scripts/ws/src/ros2/ros1_bridge/ros1_bridge/__init__.py", line 82, in <module>
    import rosmsg  # noqa
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmsg/__init__.py", line 54, in <module>
    import rosbag
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/__init__.py", line 33, in <module>
    from .bag import Bag, Compression, ROSBagException, ROSBagFormatException, ROSBagUnindexedException
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 53, in <module>
    from Crypto import Random
ModuleNotFoundError: No module named 'Crypto'
make[2]: *** [generated/get_factory.cpp] Error 1

This is complicated in the case of the bridge because we need to import rosmsg dependencies using python2:

# import catkin_pkg and rospkg which are required by rosmsg

and rosbag is a rosmsg dependency.

I have gotten around the Crypto importing issue by importing Crypto using the same workaround as for other dependencies, but it just gets one step closer:

--- stderr: ros1_bridge
Traceback (most recent call last):
  File "bin/ros1_bridge_generate_factories", line 11, in <module>
    from ros1_bridge import generate_cpp
  File "/home/rosbuild/ci_scripts/ws/src/ros2/ros1_bridge/ros1_bridge/__init__.py", line 100, in <module>
    import rosmsg  # noqa
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmsg/__init__.py", line 54, in <module>
    import rosbag
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/__init__.py", line 33, in <module>
    from .bag import Bag, Compression, ROSBagException, ROSBagFormatException, ROSBagUnindexedException
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 53, in <module>
    from Crypto import Random
  File "/usr/lib/python2.7/dist-packages/Crypto/Random/__init__.py", line 28, in <module>
    from Crypto.Random import OSRNG
  File "/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/__init__.py", line 32, in <module>
    from Crypto.Random.OSRNG.posix import new
  File "/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/posix.py", line 66
    except IOError, e:
                  ^
SyntaxError: invalid syntax
make[2]: *** [generated/get_factory.cpp] Error 1

I can keep working around this, but wanted to ask @dirk-thomas if it is possible to instead not import rosbag globally upon import of rosmsg? or to only import Crypto locally inside rosbag, instead? I think then we wouldn't have to modify any import code in the bridge to work around it.

ros1_bridge crashes when a rospy ROS 1 subscriber that is subscribing to a ROS 2 topic disconnects if bridge is not using `--bridge-all-topics`

Bug report

Required Info:

  • Operating System:
    Ubuntu 16.04
  • Installation type:
    Binaries
  • Version or commit hash:
    Ardent
  • DDS implementation:
    Fast-RTPS
  • Client library (if applicable):
    N/A

Steps to reproduce issue

Create a ROS 2 Publisher, start this publisher, then start the ros1_bridge dynamic_bridge without any bridging arguments.

Create a ROS 1 python script using rospy, and subscribe to this topic. Then either call unregister() or simply terminate the node.

Expected behavior

The ROS 1 node should shut down and the bridge should be unaffected.

Actual behavior

The bridge exits, sometimes with no printout but often with a what() printout indicating an Illegal Argument.

Additional information

If --bridge-all-topics is passed to the bridge, it does not crash when the subscriber exits.

We discovered this while working on #130 and #129. I'm hoping to be able to provide more information for debugging once I get a debug build of our bridge (as indicated in #130) up and running, which should be this week.

Expose throughput and heartbeat settings

We use the ros1 to ros2 bridge to send large point clouds around over WiFi. Because of the data size, the flood of UDP packets results in dropped packets. With the default heartbeat settings, this results in quite a big delay using RELIABLE and using BEST_EFFORT we would lose a large number of packets.

Is it possible to set the maximum throughput and configure the hearbeat settings?

Crash in std::map when initially connecting

I get this crash when I run dynamic_bridge on our robots. I assume it's a particular node or topic that triggers it, because when I only run a subset of the system, the bridge does seem to work.

Failed to read request_type from a headerFailed to read request_type from a headerFailed to read request_type from a headerterminate called after throwing an instance of 'std::out_of_range'
  what():  map::at

Backtrace:

(gdb) bt
#0  0x00007ffff51b8418 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff51ba01a in __GI_abort () at abort.c:89
#2  0x00007ffff57f184d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff57ef6b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff57ef701 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff57ef919 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff58182bf in std::__throw_out_of_range(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x000000000040d67a in std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::at (
    __k="name", this=0x7fffa80f43b0) at /usr/include/c++/5/bits/stl_map.h:532
#8  update_bridge (ros1_node=..., ros2_node=std::shared_ptr (count 8, weak 1) 0x741550, ros1_publishers=std::map with 391 elements = {...}, 
    ros1_subscribers=std::map with 390 elements = {...}, ros2_publishers=std::map with 0 elements, ros2_subscribers=std::map with 0 elements, 
    ros1_services=std::map with 20 elements = {...}, ros2_services=std::map with 0 elements, bridges_1to2=std::map with 0 elements, 
    bridges_2to1=std::map with 0 elements, service_bridges_1_to_2=std::map with 0 elements, service_bridges_2_to_1=std::map with 0 elements, 
    bridge_all_1to2_topics=false, bridge_all_2to1_topics=false) at /home/rosbuild/ci_scripts/ws/src/ros2/ros1_bridge/src/dynamic_bridge.cpp:288
#9  0x00000000004104bc in <lambda(const ros::TimerEvent&)>::operator()(const ros::TimerEvent &) const (__closure=0xccc9c0)
    at /home/rosbuild/ci_scripts/ws/src/ros2/ros1_bridge/src/dynamic_bridge.cpp:583
#10 0x00007ffff72244eb in ros::TimerManager<ros::Time, ros::Duration, ros::TimerEvent>::TimerQueueCallback::call() () from /opt/ros/kinetic/lib/libroscpp.so
#11 0x00007ffff7249cf0 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from /opt/ros/kinetic/lib/libroscpp.so
#12 0x00007ffff724b0f3 in ros::CallbackQueue::callAvailable(ros::WallDuration) () from /opt/ros/kinetic/lib/libroscpp.so
#13 0x00007ffff72a2af4 in ros::AsyncSpinnerImpl::threadFunc() () from /opt/ros/kinetic/lib/libroscpp.so
#14 0x00007ffff44075d5 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
#15 0x00007ffff79be6fa in start_thread (arg=0x7fffaef9b700) at pthread_create.c:333
#16 0x00007ffff5289b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

This is using the implementation that is included with the Beta 1 binary download for Linux (so, bundled FreeRTPS, I believe).

dynamic_bridge: No executable found

After a fresh ros2 beta2 source install I tried ros2 run ros1_bridge dynamic_bridge, but got a No executable found error.
So I tried to compile ros1_bridge manually, by typing: src/ament/ament_tools/scripts/ament.py build --build-tests --symlink-install -j1 --only ros1_bridge (as suggested in the ros1_bridge Readme file). I sourced my ROS1 environment beforehand.
But ament did not create any executables, although there was no error in the output:

Process package 'ros1_bridge' with context:
--------------------------------------------------------------------------------
 source_space => /home/username/ros2_ws/src/ros2/ros1_bridge
  build_space => /home/username/ros2_ws/build/ros1_bridge
install_space => /home/username/ros2_ws/install
   make_flags => -j1
  build_tests => True
--------------------------------------------------------------------------------
+++ Building 'ros1_bridge'
==> '. /home/username/ros2_ws/build/ros1_bridge/cmake__build.sh && /usr/bin/make cmake_check_build_system' in '/home/username/ros2_ws/build/ros1_bridge'
==> '. /home/username/ros2_ws/build/ros1_bridge/cmake__build.sh && /usr/bin/make -j1' in '/home/username/ros2_ws/build/ros1_bridge'
+++ Installing 'ros1_bridge'
==> '. /home/username/ros2_ws/build/ros1_bridge/cmake__install.sh && /usr/bin/make install' in '/home/username/ros2_ws/build/ros1_bridge'
Install the project...
-- Install configuration: ""
-- Execute custom install script
-- Symlinking: /home/username/ros2_ws/install/share/ament_index/resource_index/package_run_dependencies/ros1_bridge
-- Symlinking: /home/username/ros2_ws/install/share/ament_index/resource_index/parent_prefix_path/ros1_bridge
-- Symlinking: /home/username/ros2_ws/install/share/ros1_bridge/environment/ament_prefix_path.sh
-- Symlinking: /home/username/ros2_ws/install/share/ros1_bridge/environment/path.sh
-- Symlinking: /home/username/ros2_ws/install/share/ros1_bridge/local_setup.bash
-- Symlinking: /home/username/ros2_ws/install/share/ros1_bridge/local_setup.sh
-- Symlinking: /home/username/ros2_ws/install/share/ros1_bridge/local_setup.zsh
-- Symlinking: /home/username/ros2_ws/install/share/ament_index/resource_index/packages/ros1_bridge
-- Symlinking: /home/username/ros2_ws/install/share/ros1_bridge/cmake/ros1_bridgeConfig.cmake
-- Symlinking: /home/username/ros2_ws/install/share/ros1_bridge/cmake/ros1_bridgeConfig-version.cmake
-- Symlinking: /home/username/ros2_ws/install/share/ros1_bridge/package.xml
-- [ament] Deploying: /home/username/ros2_ws/install/local_setup.bash
-- [ament] Deploying: /home/username/ros2_ws/install/local_setup.sh
-- [ament] Deploying: /home/username/ros2_ws/install/local_setup.zsh
-- [ament] Deploying: /home/username/ros2_ws/install/setup.bash
-- [ament] Deploying: /home/username/ros2_ws/install/setup.sh
-- [ament] Deploying: /home/username/ros2_ws/install/setup.zsh
-- [ament] Deploying: /home/username/ros2_ws/install/_order_packages.py

I had to remove --build-tests from the ament command to make ament create the executables successfully (src/ament/ament_tools/scripts/ament.py build --symlink-install -j1 --only ros1_bridge). After this successful build, ament also worked with --build-tests.

I do not know, if this strange behavior is due to a bug in the CMakeLists.txt file or in ament or if it has something to do with my machine. I just wanted to let you know.

Failed to build bridge using melodic and bouncy

Bug report

Required Info:

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • bouncy
  • DDS implementation:
    • N/A
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

. /opt/ros/melodic/setup.bash
. /opt/ros/bouncy/local_setup.bash
colcon build --packages-select ros1_bridge --cmake-force-configure

Expected behavior

The ROS 1 bridge should succeed.

Actual behavior

developer@74e0cb101752:~/workspaces/bridge_ws$ . /opt/ros/melodic/setup.bash
developer@74e0cb101752:~/workspaces/bridge_ws$ . /opt/ros/bouncy/local_setup.bash
ROS_DISTRO was set to 'melodic' before. Please make sure that the environment does not mix paths from different distributions.
developer@74e0cb101752:~/workspaces/bridge_ws$ colcon build --packages-select ros1_bridge --cmake-force-configure
Starting >>> ros1_bridge
--- stderr: ros1_bridge                         
Traceback (most recent call last):
  File "/home/developer/workspaces/bridge_ws/build/ros1_bridge/catkin_generated/generate_cached_setup.py", line 22, in <module>
    code = generate_environment_script('/home/developer/workspaces/bridge_ws/build/ros1_bridge/devel/env.sh')
  File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/environment_cache.py", line 62, in generate_environment_script
    env_after = ast.literal_eval(output.decode('utf8'))
  File "/usr/lib/python3.6/ast.py", line 48, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python3.6/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 1
    ROS_DISTRO was set to 'bouncy' before. Please make sure that the environment does not mix paths from different distributions.
                 ^
SyntaxError: invalid syntax
CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python3
  "/home/developer/workspaces/bridge_ws/build/ros1_bridge/catkin_generated/generate_cached_setup.py")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/all.cmake:198 (safe_execute_process)
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:12 (find_package)
  /opt/ros/melodic/share/genmsg/cmake/genmsgConfig.cmake:197 (include)
  /opt/ros/melodic/share/actionlib_msgs/cmake/actionlib_msgs-extras.cmake:2 (find_package)
  /opt/ros/melodic/share/actionlib_msgs/cmake/actionlib_msgsConfig.cmake:197 (include)
  CMakeLists.txt:77 (find_package)


---
Failed   <<< ros1_bridge        [ Exited with code 1 ]

Summary: 0 packages finished [4.98s]
  1 package failed: ros1_bridge
  1 package had stderr output: ros1_bridge

Additional information

Warning about ROS_DISTRO changing

The build fails because the output of this command can't be eval()'d to python.

/home/developer/workspaces/bridge_ws/build/ros1_bridge/devel/env.sh python -c "import os; print(dict(os.environ))"

The ROS_DISTRO warning appears to be the problem.

developer@74e0cb101752:~/workspaces/bridge_ws$ . /opt/ros/melodic/setup.bash 
developer@74e0cb101752:~/workspaces/bridge_ws$ . /opt/ros/bouncy/local_setup.bash 
ROS_DISTRO was set to 'melodic' before. Please make sure that the environment does not mix paths from different distributions.

# Note, must have tried to build once for `env.sh` to exist.
developer@74e0cb101752:~/workspaces/bridge_ws$ /home/developer/workspaces/bridge_ws/build/ros1_bridge/devel/env.sh python -c "import os; print(dict(os.environ))"
ROS_DISTRO was set to 'bouncy' before. Please make sure that the environment does not mix paths from different distributions.
{'USERNAME': 'developer', 'ROS_DISTRO': 'melodic', 'LINES': '49', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'ROSLISP_PACKAGE_DIRECTORIES': '/home/developer/workspaces/bridge_ws/build/ros1_bridge/devel/share/common-lisp', 'HOME': '/home/developer', 'PATH': '/opt/ros/melodic/bin:/opt/ros/bouncy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/developer/.local/bin:/home/developer/.local/bin', 'CMAKE_PREFIX_PATH': '/home/developer/workspaces/bridge_ws/build/ros1_bridge/devel:/opt/ros/melodic', 'DISPLAY': ':0', 'AMENT_PREFIX_PATH': '/opt/ros/bouncy', 'TERM': 'xterm', 'XAUTHORITY': '/tmp/.docker.xauth', 'SHLVL': '2', 'LD_LIBRARY_PATH': '/opt/ros/melodic/lib:/opt/ros/bouncy/opt/rviz_yaml_cpp_vendor/lib:/opt/ros/bouncy/opt/rviz_ogre_vendor/lib:/opt/ros/bouncy/lib/x86_64-linux-gnu:/opt/ros/bouncy/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/x86_64-linux-gnu/gazebo-9/plugins:/usr/lib/x86_64-linux-gnu/gazebo-9/plugins', 'NVIDIA_VISIBLE_DEVICES': 'all', '_': '/home/developer/workspaces/bridge_ws/build/ros1_bridge/devel/env.sh', 'ROS_ETC_DIR': '/opt/ros/melodic/etc/ros', 'ROS_PYTHON_VERSION': '2', 'OGRE_RESOURCE_PATH': '/usr/lib/x86_64-linux-gnu/OGRE-1.9.0', 'GAZEBO_MASTER_URI': 'http://localhost:11345', 'PYTHONPATH': '/opt/ros/bouncy/lib/python3.6/site-packages:/opt/ros/melodic/lib/python2.7/dist-packages', 'QT_X11_NO_MITSHM': '1', 'ROS_ROOT': '/opt/ros/melodic/share/ros', 'PKG_CONFIG_PATH': '/opt/ros/melodic/lib/pkgconfig', 'ROS_PACKAGE_PATH': '/home/developer/workspaces/bridge_ws/src/ros1_bridge:/opt/ros/melodic/share', 'GAZEBO_MODEL_PATH': '/usr/share/gazebo-9/models:/usr/share/gazebo-9/models:', 'NVIDIA_DRIVER_CAPABILITIES': 'graphics,compat32,utility', 'COLUMNS': '123', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'OLDPWD': '/home/developer', 'HOSTNAME': '74e0cb101752', 'GAZEBO_MODEL_DATABASE_URI': 'http://models.gazebosim.org', 'GAZEBO_PLUGIN_PATH': '/usr/lib/x86_64-linux-gnu/gazebo-9/plugins:/usr/lib/x86_64-linux-gnu/gazebo-9/plugins:', 'PWD': '/home/developer/workspaces/bridge_ws', 'ROS_MASTER_URI': 'http://localhost:11311', 'ROS_VERSION': '1', 'GAZEBO_RESOURCE_PATH': '/usr/share/gazebo-9:/usr/share/gazebo-9:', 'LD_LIBRARYPATH': '/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/x86_64-linux-gnu/gazebo-9/plugins:/home/developer/.local/lib'}
README conflicting information

There seems to be conflicting information in the README. A warning in one paragraph says CMAKE_PREFIX_PATH must not contain ROS 1 paths which would suggest that /opt/ros/<ros1 distro> should not be sourced.

The bridge uses pkg-config to find ROS 1 packages. ROS 2 packages are found through CMake using find_package(). Therefore the CMAKE_PREFIX_PATH must not contain paths from ROS 1 which would overlay ROS 2 packages.

Yet later the instructions to build say the ROS 1 workspace must be sourced before the ROS 2 workspace

Next you need to source the ROS 1 environment, for Linux and ROS Melodic that would be:
source /opt/ros/melodic/setup.bash

and

# You have already sourced your ROS installation.
# Source your ROS 2 installation:
. <install-space-with-ros2>/local_setup.bash

If I don't source the ROS1 workspace then the error is a failure to find catkin

developer@74e0cb101752:~/workspaces/bridge_ws$ . /opt/ros/bouncy/local_setup.bash 
developer@74e0cb101752:~/workspaces/bridge_ws$ colcon build --packages-select ros1_bridge --cmake-force-configure
Starting >>> ros1_bridge
--- stderr: ros1_bridge                         
Traceback (most recent call last):
  File "/home/developer/workspaces/bridge_ws/build/ros1_bridge/catkin_generated/generate_cached_setup.py", line 12, in <module>
    from catkin.environment_cache import generate_environment_script
ModuleNotFoundError: No module named 'catkin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/developer/workspaces/bridge_ws/build/ros1_bridge/catkin_generated/generate_cached_setup.py", line 20, in <module>
    from catkin.environment_cache import generate_environment_script
ModuleNotFoundError: No module named 'catkin'
CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python3
  "/home/developer/workspaces/bridge_ws/build/ros1_bridge/catkin_generated/generate_cached_setup.py")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/all.cmake:198 (safe_execute_process)
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:12 (find_package)
  /opt/ros/melodic/share/genmsg/cmake/genmsgConfig.cmake:197 (include)
  /opt/ros/melodic/share/actionlib_msgs/cmake/actionlib_msgs-extras.cmake:2 (find_package)
  /opt/ros/melodic/share/actionlib_msgs/cmake/actionlib_msgsConfig.cmake:197 (include)
  CMakeLists.txt:77 (find_package)


---
Failed   <<< ros1_bridge        [ Exited with code 1 ]

Summary: 0 packages finished [1.05s]
  1 package failed: ros1_bridge
  1 package had stderr output: ros1_bridge

If I instead interpret the warning about CMAKE_PREFIX_PATH as meaning that variable should be wiped of any ROS 1 paths, I get a failure to find FastRTPS instead

developer@74e0cb101752:~/workspaces/bridge_ws$ . /opt/ros/melodic/setup.bash 
developer@74e0cb101752:~/workspaces/bridge_ws$ . /opt/ros/bouncy/local_setup.bash 
ROS_DISTRO was set to 'melodic' before. Please make sure that the environment does not mix paths from different distributions.
developer@74e0cb101752:~/workspaces/bridge_ws$ echo $CMAKE_PREFIX_PATH
/opt/ros/melodic
developer@74e0cb101752:~/workspaces/bridge_ws$ unset CMAKE_PREFIX_PATH
developer@74e0cb101752:~/workspaces/bridge_ws$ colcon build --packages-select ros1_bridge --cmake-force-configure
Starting >>> ros1_bridge
--- stderr: ros1_bridge                         
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find FastRTPS (missing: FastRTPS_INCLUDE_DIR FastRTPS_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /opt/ros/bouncy/share/fastrtps_cmake_module/cmake/Modules/FindFastRTPS.cmake:95 (find_package_handle_standard_args)
  /opt/ros/bouncy/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cpp-extras.cmake:20 (find_package)
  /opt/ros/bouncy/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cppConfig.cmake:30 (include)
  /opt/ros/bouncy/share/rmw_implementation_cmake/cmake/call_for_each_rmw_implementation.cmake:61 (find_package)
  CMakeLists.txt:208 (call_for_each_rmw_implementation)


---
Failed   <<< ros1_bridge        [ Exited with code 1 ]

Summary: 0 packages finished [2.57s]
  1 package failed: ros1_bridge
  1 package had stderr output: ros1_bridge

Solitary messages published from ROS 1 publishers that do not latch will sometimes not arrive at the ROS 2 subscriber

Bug report

Required Info:

  • Operating System:
    Ubuntu 16.04
  • Installation type:
    Binaries
  • Version or commit hash:
    Ardent
  • DDS implementation:
    Fast-RTPS
  • Client library (if applicable):
    N/A

Steps to reproduce issue

Create a ROS 2 subscriber and start it, then start a ros1_bridge dynamic_bridge WITHOUT --bridge-all-topics.

Create a ROS 1 node with a publisher targeting the ROS 2 subscriber that does not latch and only publishes a single message (does not stream messages), and that exits after publishing its message. Run this node.

Expected behavior

The ROS 2 subscriber should receive the message via the bridge.

Actual behavior

Sometimes, the bridge will accept the message but the subscriber will never receive it. It's not reliably reproducible, but it DOES reliably STOP happening if you use --bridge-all-topics. It is also reliably fixed by using a latching publisher.

ROS 2 listener does not respond to ROS 1 talker

As of Alpha 2, a ROS 2 listener does not appear to trigger callbacks when subscribed to a ROS 1 talker, even though the dynamic bridge registers the topic and prints out the message "Passing message from ROS 1 to ROS 2". Communication does succeed in the other direction, however (A ROS 1 listener receiving messages from a ROS 2 talker.

I used the instructions in the README for this repo to produce this error:

https://github.com/ros2/ros1_bridge/blob/master/README.md

rviz2 tf message drop

Bug report

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • from source
  • Version or commit hash:
    • release-latest/ros2.repos
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

Step 1:

terimal 1:

setup ros1 environment(kinetic) and run

source <path-to-ros1>/setup.bash 
roscore

terminal 2:

build rotors_simulator with ros1

cd ~/catkin_ws/src
git clone https://github.com/ethz-asl/mav_comm
git clone https://github.com/ethz-asl/rotors_simulator
touch ~/catkin_ws/src/rotors_simulator/rotors_hil_interface/CATKIN_IGNORE
cd ~/catkin_ws && catkin_make

run the mav_with_joy.launch

source ~/catkin_ws/devel/setup.bash
roslaunch rotors_gazebo mav_with_joy.launch 

it will start gazebo, push the start button at gazebo

Step 2:

terminal 3

make the drone flying

source ~/catkin_ws/devel/setup.bash
rostopic pub /firefly/joy sensor_msgs/Joy "header: 
  seq: 0                                           
  stamp:                                             
    secs: 0
    nsecs: 0
  frame_id: ''
axes:
- 0
buttons:
- 3" 

Step 3:

terminal 4:

run the ros1_bridge

source <path-to-ros1>/setup.bash 
source <path-to-ros2>/local_setup.bash 
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge

terminal 5:

start rviz and rviz2

source <path-to-ros2>/local_setup.bash 
rviz2

add the tf in rviz2

terminal 6:

source <path-to-ros1>/setup.bash 
rviz

add the tf in rviz

Expected behavior

the tf frame should be same smooth between rviz and rviz2

Actual behavior

rviz2 is obvious lag and these are some tf messages lost

Additional information

If whe add up the Frame rate in rviz2 the display will more smooth

the ros2 run tf2_ros tf2_monitor
information is

All Broadcasters:
Node: <no authority available> 260.361 Hz, Average Delay: 1.53372e+09 Max Delay: 1.53372e+09

mem (7.7 GiB)

cpu (Intel® Core™ i7-8550U CPU @ 1.80GHz × 8 ) information

29750 wbl       20   0 4235388 366848 144508 R 105.3  4.6  30:30.85 gzclient                                                                             
29788 wbl       20   0 3563996 151204  82460 S  37.2  1.9  10:09.64 gzserver                                                                             
 1007 root      20   0  564680  87252  55464 S  11.6  1.1  11:14.80 Xorg                                                                                 
17930 wbl       20   0 1050108  87516  78152 S  11.0  1.1   0:21.32 dynamic_bridge                                                                       
25865 wbl       20   0 2113812 130572  99360 S  11.0  1.6   0:09.23 rviz                                                                                 
16677 wbl       20   0 1408952 132244 102928 S  10.3  1.6   0:21.86 rviz2                                                                                
 1906 wbl       20   0 1598140 149496  57432 S   6.6  1.9   8:05.13 compiz                                                                               
29602 wbl       20   0  881344  88116  34936 S   2.7  1.1   0:43.62 python                                                                               
 2120 wbl       20   0  644320  42284  15164 S   2.3  0.5   2:25.98 gnome-terminal-                                                                      
29503 wbl       20   0  617432  53792   7344 S   2.3  0.7   0:23.69 rosmaster                                                                            
29586 wbl       20   0  462444  14940  13212 S   2.3  0.2   0:36.95 robot_state_pub                                                                      
 1034 root     -51   0       0      0      0 S   1.7  0.0   1:44.17 irq/136-nvidia                                                                       
 1751 wbl       20   0 1316128 657092   8404 S   1.3  8.2  18:50.75 hud-service                                                                          
29568 wbl       20   0  346236  11832  10872 S   1.3  0.1   0:25.30 roll_pitch_yawr                                                                      
29516 wbl       20   0  399680  10108   9204 S   0.7  0.1   0:11.72 rosout                                                                               
29551 wbl       20   0  399736   9832   8932 S   0.7  0.1   0:11.05 joy_node                                                                             
29552 wbl       20   0  408040   9956   9052 S   0.7  0.1   0:11.20 rotors_joy_inte                                                                      
    8 root      20   0       0      0      0 I   0.3  0.0   0:08.23 rcu_sched                                                                            
 1775 wbl       20   0  659660  31372  15064 S   0.3  0.4   0:42.02 unity-panel-ser                                                                      
 2137 wbl       20   0  977208  97308  44136 S   0.3  1.2   0:18.31 fcitx-qimpanel                                                                       
23480 wbl       20   0   49568   3792   3064 R   0.3  0.0   0:00.16 top                                                                                  
    1 root      20   0  185704   4492   3168 S   0.0  0.1   0:01.98 systemd                                                                              
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.01 kthreadd                                                                             
    4 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/0:0H                                                                         
    6 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 mm_percpu_wq                                                                         
    7 root      20   0       0      0      0 S   0.0  0.0   0:00.85 ksoftirqd/0                                                                          
    9 root      20   0       0      0      0 I   0.0  0.0   0:00.00 rcu_bh                                                                               
   10 root      rt   0       0      0      0 S   0.0  0.0   0:00.08 migration/0                                                                          
   11 root      rt   0       0      0      0 S   0.0  0.0   0:00.02 watchdog/0                                                                           
   12 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/0                                                                              
   13 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/1                                                                              
   14 root      rt   0       0      0      0 S   0.0  0.0   0:00.02 watchdog/1                                                                           
   15 root      rt   0       0      0      0 S   0.0  0.0   0:00.08 migration/1                                                                          
   16 root      20   0       0      0      0 S   0.0  0.0   0:00.88 ksoftirqd/1                                                                          
   18 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/1:0H                                                                         
   19 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/2 

Feature request

Feature description

Implementation considerations

CMake configure step should list all ROS2 message packages found

Currently it prints only the output of find_package so if dependencies are found during the process they are not listed.

We should instead find_package the ROS 2 packages with QUIET and then print the full list of packages found.

From nightlies:

-- Found composition: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/composition/cmake)
-- Found stereo_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/stereo_msgs/cmake)
-- Found lifecycle_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/lifecycle_msgs/cmake)
-- Found visualization_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/visualization_msgs/cmake)
-- Found example_interfaces: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/example_interfaces/cmake)
-- Found actionlib_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/actionlib_msgs/cmake)
-- Found rosgraph_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/rosgraph_msgs/cmake)
-- Found std_srvs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/std_srvs/cmake)
-- Found trajectory_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/trajectory_msgs/cmake)
-- Found shape_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/shape_msgs/cmake)
-- Found logging_demo: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/logging_demo/cmake)
-- Found pendulum_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/pendulum_msgs/cmake)
-- Found nav_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/nav_msgs/cmake)
-- Found tf2_msgs: 0.8.0 (/home/rosbuild/ci_scripts/ws/install/share/tf2_msgs/cmake)
-- Found test_msgs: 0.4.0 (/home/rosbuild/ci_scripts/ws/install/share/test_msgs/cmake)

As an example: sensor_msgs is not in the list

But we actually build factories for it:

composition_factories.cpp.o
stereo_msgs_factories.cpp.o
lifecycle_msgs_factories.cpp.o
visualization_msgs_factories.cpp.o
example_interfaces_factories.cpp.o
rcl_interfaces_factories.cpp.o
std_msgs_factories.cpp.o
actionlib_msgs_factories.cpp.o
rosgraph_msgs_factories.cpp.o
std_srvs_factories.cpp.o
trajectory_msgs_factories.cpp.o
shape_msgs_factories.cpp.o
geometry_msgs_factories.cpp.o
diagnostic_msgs_factories.cpp.o
logging_demo_factories.cpp.o
pendulum_msgs_factories.cpp.o
nav_msgs_factories.cpp.o
tf2_msgs_factories.cpp.o
sensor_msgs_factories.cpp.o
test_msgs_factories.cpp.o

ros1_bridge silently stops working and cannot be restarted

Bug report

Required Info:

  • Operating System:
    Ubuntu 16.04
  • Installation type:
    Binaries
  • Version or commit hash:
    Ardent
  • DDS implementation:
    Fast-RTPS
  • Client library (if applicable):
    N/A

Steps to reproduce issue

This is probably not an easy repro, I'm not even sure what causes it myself. Right now I'm looking for information on how to get more verbosity out of the bridge so I can figure out what is hanging and why, because the current failure mode is entirely silent.

We are using a version of the ros1_bridge with our messages built in to it. We haven't modified the bridge itself, just linked our messages in to it. You can find a .tar'd install space of it here: https://bintray.com/ihmcrobotics/distributions/ihmc-ros1-bridge

We are able to use the bridge to successfully send and receive topics to and from ROS 1 based software (ROS 1 Kinetic installed from apt-get on Ubuntu 16.04) but occasionally the bridge just stops working. It will no longer create console output when a new talker or listener attempts to participate. The bridge also stops responding to INT signals. The only way to terminate the bridge is to send an SIGKILL. Even more interestingly, once you have sent SIGKILL to the bridge and stopped the ROS 2 daemon with ros2 daemon stop, then restarted the bridge, it continues to behave in this way. Bridges for new talkers/listeners do not get created and signals are not handled.

I've tried SIGKILL'ing the bridge then restarting it with --show-introspection and it prints a few messages about bridging some running ROS 2 publishers that we have but after just a few seconds it stops printing any introspections as well.

I'd love to be able to provide more useful information I just don't know where to start since the failure mode is entirely silent. If I can rebuild the bridge with some debug flags or something to get more verbose logging I'd love to start there and hopefully get this figured out.

Expected behavior

ROS 1 bridge is able to bridge ROS 2 and ROS 1 talkers/listeners

Actual behavior

ROS 1 bridge stops working and cannot be restarted

Bidirectional bridge duplicates messages in ROS1

Bug report

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • from source
  • Version or commit hash:
    • 0.4.0
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

I have generated a bidirectional bridge using parameter_bridge to send a std_msgs/Float32MultiArray messages from ROS1 to ROS2. It works but I have just realized that when I use rostopic hz /topic I get twice the frequency I set in my code. Turning off bridge make rostopic hz /topic show correct value. Using rostopic info /topic shows:

 * /start_controller (http://xxx:44737/)
 * /ros_bridge (http://xxx:38531/)

Subscribers: 
 * /rostopic_28342_1522934521725 (http://xxx:46713/)
 * /ros_bridge (http://xxx:38531/)

Inspecting ROS1 topic clearly shows that every message is duplicated. This makes me think that parameter_bridge sends ROS1 message to ROS2 and then from ROS2 back to ROS1. Unfortunately it's not looping back and doesn't crash: messages on ROS2 side are not duplicated.

dynamic_bridge crashes when trying to send PointCloud2 Messages

I am trying to transmit PointCloud2 messages from a ROS system (currently using a kinect) using a ros1_bridge, and have a ROS2 subscriber on a different machine.

When I try to run a ROS2 subscriber, the dynamic_bridge will crash. I've compiled ros2 from source (using fastRTPS), and I am using ros kinetic on ubuntu 16.04.

ros1_bridge is not stable on rasperry pi 3

Hello,

I sucessfully compiled the ros1_bridge on my raspberry pi3 (I tried both cross compiling and set swap memory),

Now, the problem is the dynamic bridge can not connect to the ros1 chatter or ros1 listener very well,

the program didn't crash, but just not working, I saw nothing after launch the "ros1_bridge" (but sometimes it still working!)

Environment

  • Ubuntu Mate 16.04 (raspberry pi3)
  • ROS2 alpha7

Could you give me any help, thanks!

is there any "Naming rules" in ros1_bridge when using custom msg ?

I want communicate between ros1 and ros2 using custom msg with the help of ros1_bridge, but I was stick to building msg, I build package called "zoro_msg", however "ros2 run ros1_bridge dynamic_bridge --print-pairs" command did't display the "zoro_msg", and talker could't pass data to listener through ros bridge. and I try a lot, lastly I changed package name from "zoro_msg" to "zoro_msgs", and then it worked , but I got confused and didn't know why . could anybody tell me why ?
the code is in : https://github.com/lxbeyond/ros1_bridge_msg.git

Log message does not contain specific information

Bug report

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • source
  • Version or commit hash:
    • master
  • DDS implementation:
    • doesn't matter
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

Run the dynamic bridge with at least one topic pair that matches on each side, and then observe the incorrect log message.

Expected behavior

The log to contain something other than ROS1_T or ROS2_T.

Additional information

Here's an example of the log message:

[INFO] [ros1_bridge]: Passing message from ROS 1 ROS1_T to ROS 2 ROS2_T (showing msg only once per type) (ros1_callback() at /home/william/ros2_ws/src/ros2/ros1_bridge/include/ros1_bridge/factory.hpp:130)

It's nice that we went to so much effort to limit its output rate, but the content doesn't really tell you anything (neither the type nor the topic).

I believe the use of a macro here does nothing and you'd have to use typeid(ROS1_T).name() instead, but that will probably be mangled too:

_ros1_bridge_type_to_name(ROS1_T) " to ROS 2 "
_ros1_bridge_type_to_name(ROS2_T) " (showing msg only once per type)");

fix case where a ros2 client will cause a ros2 service to be created

See: https://github.com/ros2/ros1_bridge/pull/73/files#diff-54d4f378a6fcedb12fbad17ea33e7ce8R719

This is the scenario:

  • roscore
  • dynamic_bridge
  • ros2 service client on /add_two_ints (for example)

In this case, the dynamic_bridge sees that there is a service in ROS 2 on /add_two_ints, but it does not know that there is only a client (and not a service server). But it creates the "bridge" anyways, creating a ROS 1 service server even though there is no matching ROS 2 service server and calling the ROS 1 service server would always fail.

The reason the dynamic_bridge does not check this case is that it currently needs a ROS 2 service client to know if a matching service server exists. There are some underlying reasons for this, but to resolve this we either need to:

  • make it easier to create a client with just a string for the service type (so the bridge can create a client to check, even though that's not very efficient way to do it)
  • or add an rmw API to check for the existence of the service server with just a service name as input (not requiring a service client too, which is currently the case)

publishers should use reliable

Currently all publishers created by the bridge are best effort and therefore reliable subscribers are unable to receive the bridged data directly.

Create a bidirectional bridge

  • having a ROS 2 publisher and subscriber with the same topic and type fails at runtime
  • to prevent routing loops the bridge must not accept messages coming from itself
    • for ROS 1 it checks the callerid and drop the message after receiving it
    • for ROS 2 it checks the guid of the sample in the dds buffer and skips taking it

[field mapping] A missing field from 'fields_1_to_2' will silently not be bridged and be zero-initialized instead

If one need to specify the mapping from one field in ROS 1 that's different in ROS 2, one currently need to explicitly list all the fields of the message even if they have identical names.
If some fields are ommited from the rules, the bridge will not complain, it will just not populate these fields and pass fields zero initialized instead.

Is it intentional? to e.g. allow messages that have more fields in one ROS version to be passed on the other side of the bridge?

Error executing ros bridge

OS- Ubuntu 16.04
ROS 1 version - ROS Kinetic
ROS 2 version - Beta 2

Error- On running command "ros2 run ros1_bridge dynamic_bridge " getting error no executable found

rosbridge error

ROS 2 port of Gazebo Msgs incompatible with ROS 1 bridge.

Bug report

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • Kinetic from binary, ROS 2 from source, release latest tag (Bouncy)
  • Version or commit hash:
    • Bouncy
  • DDS implementation:
  • Client library (if applicable):

Steps to reproduce issue

Gazebo msgs has recently been ported to ROS 2. Rebuilding the ros1_bridge with that repo present results in a compilation failure.

libros1_bridge.so: undefined reference to `ros1_bridge::Factory<gazebo_msgs::ODEJointProperties_<std::allocator<void> >, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > >::convert_1_to_2(gazebo_msgs::ODEJointProperties_<std::allocator<void> > const&, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> >&)'
libros1_bridge.so: undefined reference to `ros1_bridge::Factory<gazebo_msgs::ODEJointProperties_<std::allocator<void> >, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > >::convert_2_to_1(gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > const&, gazebo_msgs::ODEJointProperties_<std::allocator<void> >&)'
collect2: error: ld returned 1 exit status
make[2]: *** [static_bridge] Error 1
make[1]: *** [CMakeFiles/static_bridge.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
libros1_bridge.so: undefined reference to `ros1_bridge::Factory<gazebo_msgs::ODEJointProperties_<std::allocator<void> >, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > >::convert_1_to_2(gazebo_msgs::ODEJointProperties_<std::allocator<void> > const&, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> >&)'
libros1_bridge.so: undefined reference to `ros1_bridge::Factory<gazebo_msgs::ODEJointProperties_<std::allocator<void> >, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > >::convert_2_to_1(gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > const&, gazebo_msgs::ODEJointProperties_<std::allocator<void> >&)'
collect2: error: ld returned 1 exit status
make[2]: *** [parameter_bridge] Error 1
make[1]: *** [CMakeFiles/parameter_bridge.dir/all] Error 2
libros1_bridge.so: undefined reference to `ros1_bridge::Factory<gazebo_msgs::ODEJointProperties_<std::allocator<void> >, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > >::convert_1_to_2(gazebo_msgs::ODEJointProperties_<std::allocator<void> > const&, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> >&)'
libros1_bridge.so: undefined reference to `ros1_bridge::Factory<gazebo_msgs::ODEJointProperties_<std::allocator<void> >, gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > >::convert_2_to_1(gazebo_msgs::msg::ODEJointProperties_<std::allocator<void> > const&, gazebo_msgs::ODEJointProperties_<std::allocator<void> >&)'
collect2: error: ld returned 1 exit status

Expected behavior

Actual behavior

Additional information

The error only affects the ODEJointProperties message. This is because 2 of the fields had to be renamed due to the new ROS 2 naming conventions. The original version used camelCase names for hiStop and loStop fields. This is disallowed by the ROS 2 msg file processor.

Because of the name mismatch, I believe the ros1_bridge code generator doesn't consider the ODEJointProperties in Kinetic a match and doesn't generate code.

Unfortunately, the ODEJointProperties message is referred to from the SetJointProperties service which the ros1_bridge does generate code for. This results in the undefined reference above.

ROS1 package that causes ros1_bridge build to fail in find_ros1_package

Required Info:

Reproduction steps:

  1. mkdir -p ~/test_ws/src && cd ~/test_ws/src
  2. git clone https://github.com/clearpathrobotics/dynamic_gazebo_models
  3. cd .. && source /opt/kinetic/setup.bash && catkin_make
  4. mkdir -p ~/bridge_ws/src && cd ~/bridge_ws/src
  5. git clone http://github.com/ros2/ros1_bridge
  6. cd .. && source /opt/ros2-linux/setup.bash && ament build -j1

The build will fail with the message:

--   Found actionlib_msgs, version 1.12.5
-- Checking for module 'bond'
--   Found bond, version 1.7.19
-- Checking for module 'diagnostic_msgs'
--   Found diagnostic_msgs, version 1.12.5
-- Checking for module 'dynamic_gazebo_models'
--   Found dynamic_gazebo_models, version 0.1.0
CMake Error at cmake/find_ros1_package.cmake:63 (message):
  pkg-config module 'dynamic_gazebo_models' failed to find library
  'dynamic_gazebo_models'
Call Stack (most recent call first):
  CMakeLists.txt:47 (find_ros1_package)


-- Configuring incomplete, errors occurred!
See also "/home/deng/bridge_ws/build/ros1_bridge/CMakeFiles/CMakeOutput.log".

<== Command '. /home/deng/bridge_ws/build/ros1_bridge/cmake__build.sh && /usr/bin/cmake /home/deng/bridge_ws/src/ros1_bridge -DBUILD_TESTING=0 -DCMAKE_INSTALL_PREFIX=/home/deng/bridge_ws/install' failed in '/home/deng/bridge_ws/build/ros1_bridge' with exit code '1'
<== Command '. /home/deng/bridge_ws/build/ros1_bridge/cmake__build.sh && /usr/bin/cmake /home/deng/bridge_ws/src/ros1_bridge -DBUILD_TESTING=0 -DCMAKE_INSTALL_PREFIX=/home/deng/bridge_ws/install' failed in '/home/deng/bridge_ws/build/ros1_bridge' with exit code '1'

We're unsure what it is about the package that needs to be fixed so that ros1_bridge can be built with a workspace that contains this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.