Comments (9)
As there is no equivalent type for ROS1 time
in ROS 2 (and won't be, by design). Adding mapping rules will not be enough to solve this issue.
Though being able to bridge these messages is valuable. The path forward would be to add a special handling in the bridge itself to match the fields to their equivalent in builtin_interfaces/Time (and perfomr the necessary conversions):
int32 sec -> int32 sec
int32 nsec -> uint32 nsec
from ros1_bridge.
Could this perhaps be solved by specifying a custom mapping rule?
from ros1_bridge.
Where could I put the remapping aside from having to modify a core ros package? It appears it would need to be added to the builtin_interfaces package for the bridge to accept it otherwise I get an error similar to this one:
Ignoring rule which affects a different ROS 2 package (builtin_interfaces) then the one it is defined in (my_msgs)
EDIT:
I tried adding the remapping to a source build of builtin_interfaces and it didn't appear to work, likely because there isn't a one to one mapping of the fields of each message.
from ros1_bridge.
The problem is not related to the differences in the duration
or time
types. Those are already being handled in the ros
_bridge`: see https://github.com/ros2/ros1_bridge/blob/03f95fea565c2eb28057df8f7b1595bdeac995bc/include/ros1_bridge/convert_builtin_interfaces.hpp
The bridge simply can't bridge a message definition which is not available on both side. And Clock
doesn't exist in ROS 2 atm. Please see ros2/common_interfaces#50 which add the Clock
message for ROS 2. With that being present bridging the message will work.
from ros1_bridge.
I believe this issue still persists. I'm getting the same error than @matt-attack:
failed to create 1to2 bridge for topic '/clock' with ROS 1 type 'rosgraph_msgs/Clock' and ROS 2 type 'builtin_interfaces/Time': No template specialization for the pair
check the list of supported pairs with the `--print-pairs` option
I've also tried the manual mapping but it seems to be ignored. Printing the mapping shows no instance of the required mapping. Also the mapping needs to be done in the 'builtin_interfaces' package.
I suspect that creating the rosgraph_msgs/Clock
message for ros2 is not enough because the ros2 nodes are already subscribing to the /clock
topic using the ros2 builtin_interfaces/Time
message.
from ros1_bridge.
This is not a bug on the ros1_bridge
anymore. In ROS 1 the clock
topic is documented to have the type rosgraph_msgs/Clock
(see http://wiki.ros.org/Clock#Clock_Message).
@tfoote Can you please follow up on this since you added the clock topic to rclcpp
.
from ros1_bridge.
I created ros2/rclcpp#473 to track this.
from ros1_bridge.
Thank you @dirk-thomas . While this is being worked, is there a temporary solution maybe creating a mapping for this topic?
from ros1_bridge.
Yes, you can temporarily work around it by defining a remapping rule.
from ros1_bridge.
Related Issues (20)
- Bridge generates and compiles code for all ROS 2 interfaces, even the ones without ROS 1 counterpart HOT 2
- ROS1 Bridge not working.
- symbol lookup error HOT 1
- Mapping rules file for nested custom messages
- Many packages not found by find_ros1_package() during build
- Data Type conversion directly
- Unstable behavior of std::bad_alloc HOT 2
- help wirh ros melodic and dashing bridg (it failed) HOT 1
- ros1_bridge dashing problem HOT 3
- ROS2 Foxy: bridge causing continuous errors from realsense on depth image HOT 3
- ROS2 Humble: how can I subscribe topic?
- No executable found ros1_bridge on Ubuntu 20.04 with ROS2 Humble and ROS Noetic
- ros bridge is crashing as soon as I try to run it. HOT 2
- The factors affecting the maximum frequency of topics in the ROS1 bridge HOT 1
- parameter bridge ability to rename topic
- can map custom srv but msg
- ros1_brigde cannot convert ros1bag data into ros2bag because of Qos mismatch
- build fail in Ubuntu 22.04
- ros1_bridge build error in Windows HOT 1
- Build with ROS2 Jazzy and ROS noetic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ros1_bridge.