Coder Social home page Coder Social logo

Comments (6)

ipa-hsd avatar ipa-hsd commented on June 4, 2024 1

@ravijo the CI fails because a ROS1 dependency could not be found ros2/ros1_bridge#256 (comment). Since it's a ROS2 package, I am not sure how to specify ROS1 deps. A cheap hack that worked, but not recommended is ros2/ros1_bridge#256 (comment)

But otherwise yes, ros2/ros1_bridge#256 works for actions now. Please test it if it works for your use-case.

from design.

ravijo avatar ravijo commented on June 4, 2024 1

@ipa-hsd Thanks for the update. I tested it and it works like a charm.

There was a warning about unused parameters, which I ignored. For reference, I am sharing the complete logs below:

$ colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure
Starting >>> ros1_bridge
[Processing: ros1_bridge]
[Processing: ros1_bridge]
[Processing: ros1_bridge]
[Processing: ros1_bridge]
[Processing: ros1_bridge]
[Processing: ros1_bridge]
[Processing: ros1_bridge]
[Processing: ros1_bridge]
[Processing: ros1_bridge]
--- stderr: ros1_bridge
/home/ravi/bridge_test/ros2_ws/src/ros1_bridge/src/dynamic_bridge.cpp: In function ‘void update_bridge(ros::NodeHandle&, rclcpp::Node::SharedPtr, const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&, const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&, const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&, const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&, const std::map<std::__cxx11::basic_string<char>, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >&, const std::map<std::__cxx11::basic_string<char>, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >&, const std::map<std::__cxx11::basic_string<char>, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >&, const std::map<std::__cxx11::basic_string<char>, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >&, const std::map<std::__cxx11::basic_string<char>, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >&, const std::map<std::__cxx11::basic_string<char>, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >&, std::map<std::__cxx11::basic_string<char>, Bridge1to2HandlesAndMessageTypes>&, std::map<std::__cxx11::basic_string<char>, Bridge2to1HandlesAndMessageTypes>&, std::map<std::__cxx11::basic_string<char>, ros1_bridge::ServiceBridge1to2>&, std::map<std::__cxx11::basic_string<char>, ros1_bridge::ServiceBridge2to1>&, std::map<std::__cxx11::basic_string<char>, std::unique_ptr<ros1_bridge::ActionFactoryInterface> >&, std::map<std::__cxx11::basic_string<char>, std::unique_ptr<ros1_bridge::ActionFactoryInterface> >&, bool, bool)’:
/home/ravi/bridge_test/ros2_ws/src/ros1_bridge/src/dynamic_bridge.cpp:147:69: warning: unused parameter ‘ros1_action_clients’ [-Wunused-parameter]
  147 |   const std::map<std::string, std::map<std::string, std::string>> & ros1_action_clients,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/ravi/bridge_test/ros2_ws/src/ros1_bridge/src/dynamic_bridge.cpp:149:69: warning: unused parameter ‘ros2_action_clients’ [-Wunused-parameter]
  149 |   const std::map<std::string, std::map<std::string, std::string>> & ros2_action_clients,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
---
Finished <<< ros1_bridge [5min 0s]

Summary: 1 package finished [5min 0s]
  1 package had stderr output: ros1_bridge

from design.

ipa-hsd avatar ipa-hsd commented on June 4, 2024 1

great to hear that! :)

from design.

gbiggs avatar gbiggs commented on June 4, 2024

One issue is it has the bridge always accepting goals from ROS 2 action clients before contacting the ROS 1 action server, but that hides what's happening on the ROS 1 action server from ROS 2 introspection tools.

Why not use a timeout when submitting the goal to the ROS 1 action server? Submit the goal to the ROS 1 server before accepting it on the ROS 2 side, and if the server never responds before the timeout then the bridge can respond to the ROS 2 client appropriately.

Another issue is it "detects" a ROS 1 action server or client using only a single topic, but servers or clients aren't actually functional until all topics are in use.

This is an easy problem to solve, isn't it? Look for a set of topics, and when all are available the server/client is up and running. Perhaps add a timeout so if a server partially starts or something that won't stall things.

Yet another issue is it always creates an action server if there is an action client on one side, which makes it seem like there is an action server available when there isn't.

Can the bridge look for matching pairs?

  • If a client is found on one side but no server exists on the other, then do not create the bridge's server.
  • If a client is found on one side and a server exists on the other, then do create the bridge's server.
  • If a server only is found, the do create the bridge's server.

from design.

ipa-hsd avatar ipa-hsd commented on June 4, 2024

We have a proposal for action_bridge. It currently supports forwarding goals from ROS1 action client to ROS2 action server. Please see the discussion here:

https://discourse.ros.org/t/introducing-action-bridge/9103/3

from design.

ravijo avatar ravijo commented on June 4, 2024

@ipa-hsd What is the progress on this specific issue? Is it possible to use ros1_bridge for actions?

from design.

Related Issues (20)

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.