-
 
No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.

ros_type_introspection package from ros_type_introspection repo

ros_type_introspection

Package Summary

Tags No category tags.
Version 2.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/facontidavide/ros_type_introspection.git
VCS Type git
VCS Version master
Last Updated 2020-09-03
Dev Status DEVELOPED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The ros_type_introspection package allows the user to parse and deserialize ROS messages which type is unknown at compilation time.

Additional Links

Maintainers

  • Davide Faconti

Authors

  • Davide Faconti

This library will be discontinued !!!

A large refactoring has been done to create a better and simpler library. All the development effort will be moved there.

Have a look at ros_msg_parser

Ros Message Introspection

This simple library extracts information from a ROS Message, even when its type is unknown at compilation time.

Have you ever wanted to build an app that can subscribe to any topic and extract its content, or can read data from any rosbag? What if the topic and/or the bag contains user defined ROS types ignored at compilation time?

The common solution in the ROS ecosystem is to use Python, that provides the needed introspection. Tools, for instance, like rqt_plot and rqt_bag took this approach. This library implements a C++ alternative.

This library is particularly useful to extract data from two type-erasing classes provided by ROS itself:

  1. topic_tools::ShapeShifter: a type used to subscribe to any topic, regardless of the original type.

  2. rosbag::MessageInstance: the generic type commonly used to read data from a ROS bag.

Please take a look to the examples and unit tests to see how to use the library.

Some background

The ROS Message Types can be described as a Interface Description Language. This approach is very well known and commonly used on the web and in distributed systems in general.

A rosmsg is defined by the user; an “IDL compiler”, i.e. gencpp, reads this schema and generates a header file that contains the source code that the user shall include in his/her applications. The inclusion of this header file is needed on both the publisher and the subscriber sides.

This approach provides strong and type-safe contracts between the producer and the consumer of the message and, additionally, is needed to implements a fast serialization / deserialization mechanism.

The only “problem” is that in very few use cases (for instance if you want to build a plugin to load ROS bags in MATLAB) you don’t know in advance which ROS Messages you will need to read. Therefore, you won’t be able to include the necessary header files.

Acknowledgements

This library is inspired by these other libraries matlab_rosbag and cpp_introspection.

CHANGELOG

Changelog for package ros_type_introspection

2.1.0 (2020-09-03)

  • Removed flyweight and fixed potential conversion errors
  • Update README.md
  • Contributors: Davide Faconti

2.0.4 (2019-11-07)

  • Fix bug reported in plotjuggler
  • Contributors: Davide Faconti

2.0.3 (2019-10-30)

  • critical bug fix
  • fix warning Fix sign comparison warnings
  • Fixed -Wsign-compare warnings
  • Contributors: Davide Faconti, Jarvis Schultz

2.0.2 (2019-10-01)

  • speed optimization (fix regression in 2.0)
  • Contributors: Davide Faconti

2.0.1 (2019-10-01)

  • fix (old abseil stuff)
  • Contributors: Davide Faconti

2.0.0 (2019-10-01)

1.3.3 (2019-05-10)

  • fix issue #36
  • Contributors: Davide Faconti

1.3.2 (2019-04-17)

  • fix issue #35
  • Contributors: Davide Faconti

1.3.1 (2019-03-24)

  • Merge pull request #32 from aeudes/fix_large_array
  • Fix invalid clamp and discard beaviour.
  • Contributors: Alexandre Eudes, Davide Faconti

1.3.0 (2019-01-25)

  • adding new policy
  • fix compiler warnings
  • added comment
  • Contributors: Davide Faconti, Robert Haschke, YiweiHan, janEbert

1.2.0 (2018-11-12)

  • fixed -Wreorder (#24)
    • client code can now compile with -Werror
  • solved compilation problem when convert_impl<float, float>
  • Update README.md
  • Contributors: Davide Faconti, moooeeeep

1.1.1 (2018-04-15)

  • split the project into two packages to reduce dependencies
  • Contributors: Davide Faconti

1.1.0 (2018-03-22)

  • critical bug fix
  • fixed compilation of test
  • remove potential problem in other projects
  • Contributors: Davide Faconti

1.0.2 (2018-02-08)

  • fixing issue with blobs (detected when parsing sensor_msgs::Image)
  • added test for sensor image
  • Contributors: Davide Faconti

1.0.1 (2017-11-14)

  • added return value to deserializeIntoFlatContainer
  • bug fix
  • fix compilation issue
  • fix potential issue with static variables
  • Contributors: Davide Faconti

1.0.0 (2017-10-12)

  • Complete refactoring
  • Contributors: Davide Faconti, Kartik Mohta, Ian Taylor, Mehdi Tlili

0.8.0 (2017-08-30)

  • fixing a serious issue with vectors which are too large
  • Contributors: Davide Faconti

0.7.1 (2017-08-29)

  • ros Time and Duration fixed
  • tests fixed
  • important API Change
  • might fix issue reported in #5. print_number made public
  • adding inline to fix compilation error #4
  • maintain nanosecond precision for time/duration
  • Contributors: Davide Faconti, Ian Taylor

0.6.3 (2017-06-26)

  • speed up
  • yet another bug fixed
  • considerable speed improvement
  • Contributors: Davide Faconti

0.6.2 (2017-06-23)

  • bug fix. types where missing in conversion
  • Contributors: Davide Faconti

0.6.1 (2017-06-22)

  • fixed a bug in resize
  • potential compilation problem fixed
  • Contributors: Davide Faconti

0.6.0 (2017-06-20)

  • moved the deserializing code
  • new API
  • fixing issue in resize (to be tested)
  • fixed osx compilation failure due to implicit_instantiation of std::array
  • Fix formating and typos
  • Contributors: Bo Li, Davide Faconti, Sam Pfeiffer

0.5.1 (2017-04-02)

  • fix the test
  • fix tests?
  • compilation fix
  • typo fix
  • test fixed
  • Contributors: Davide Faconti

0.5.0 (2017-03-25)

  • toStr changed
  • Contributors: Davide Faconti

0.4.3 (2017-02-13)

  • FIX: bug found in cache. reverting the recent change
  • Contributors: davide

0.4.1 (2017-02-09)

  • COSMETIC: more consistent code
  • considerable speed improvement in applyNameTransform
  • Contributors: Davide Faconti

0.4.0 (2017-02-06)

  • critical bug fixed
  • remove compilation warnings
  • Update README.md
  • Contributors: Davide Faconti

0.3.3 (2016-11-04)

  • removed serious bug that might cause double free
  • Contributors: davide

0.3.2 (2016-10-26)

  • fixing tests (EXPECTED_EQ is more informative)
  • changed the type of ROSType::baseName() and added SString::toStdString()

0.3.1 (2016-10-20)

  • added BSD license
  • added an alternative implementation of ShapeShifter

0.3.0 (2016-10-17) -----------

  • Doxygen added
  • Moved to gtests instead of Catch.
  • Final API (?)

0.2.0 (2016-10-17) -----------

  • All unit tests pass, but coverage is not very high.
  • By default is uses the custom string implementation.
  • Stable (?) API

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Deps
plotjuggler_ros

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_type_introspection at Robotics Stack Exchange

No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.

ros_type_introspection package from ros_type_introspection repo

ros_type_introspection

Package Summary

Tags No category tags.
Version 2.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/facontidavide/ros_type_introspection.git
VCS Type git
VCS Version master
Last Updated 2020-09-03
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The ros_type_introspection package allows the user to parse and deserialize ROS messages which type is unknown at compilation time.

Additional Links

Maintainers

  • Davide Faconti

Authors

  • Davide Faconti

This library will be discontinued !!!

A large refactoring has been done to create a better and simpler library. All the development effort will be moved there.

Have a look at ros_msg_parser

Ros Message Introspection

This simple library extracts information from a ROS Message, even when its type is unknown at compilation time.

Have you ever wanted to build an app that can subscribe to any topic and extract its content, or can read data from any rosbag? What if the topic and/or the bag contains user defined ROS types ignored at compilation time?

The common solution in the ROS ecosystem is to use Python, that provides the needed introspection. Tools, for instance, like rqt_plot and rqt_bag took this approach. This library implements a C++ alternative.

This library is particularly useful to extract data from two type-erasing classes provided by ROS itself:

  1. topic_tools::ShapeShifter: a type used to subscribe to any topic, regardless of the original type.

  2. rosbag::MessageInstance: the generic type commonly used to read data from a ROS bag.

Please take a look to the examples and unit tests to see how to use the library.

Some background

The ROS Message Types can be described as a Interface Description Language. This approach is very well known and commonly used on the web and in distributed systems in general.

A rosmsg is defined by the user; an “IDL compiler”, i.e. gencpp, reads this schema and generates a header file that contains the source code that the user shall include in his/her applications. The inclusion of this header file is needed on both the publisher and the subscriber sides.

This approach provides strong and type-safe contracts between the producer and the consumer of the message and, additionally, is needed to implements a fast serialization / deserialization mechanism.

The only “problem” is that in very few use cases (for instance if you want to build a plugin to load ROS bags in MATLAB) you don’t know in advance which ROS Messages you will need to read. Therefore, you won’t be able to include the necessary header files.

Acknowledgements

This library is inspired by these other libraries matlab_rosbag and cpp_introspection.

CHANGELOG

Changelog for package ros_type_introspection

2.1.0 (2020-09-03)

  • Removed flyweight and fixed potential conversion errors
  • Update README.md
  • Contributors: Davide Faconti

2.0.4 (2019-11-07)

  • Fix bug reported in plotjuggler
  • Contributors: Davide Faconti

2.0.3 (2019-10-30)

  • critical bug fix
  • fix warning Fix sign comparison warnings
  • Fixed -Wsign-compare warnings
  • Contributors: Davide Faconti, Jarvis Schultz

2.0.2 (2019-10-01)

  • speed optimization (fix regression in 2.0)
  • Contributors: Davide Faconti

2.0.1 (2019-10-01)

  • fix (old abseil stuff)
  • Contributors: Davide Faconti

2.0.0 (2019-10-01)

1.3.3 (2019-05-10)

  • fix issue #36
  • Contributors: Davide Faconti

1.3.2 (2019-04-17)

  • fix issue #35
  • Contributors: Davide Faconti

1.3.1 (2019-03-24)

  • Merge pull request #32 from aeudes/fix_large_array
  • Fix invalid clamp and discard beaviour.
  • Contributors: Alexandre Eudes, Davide Faconti

1.3.0 (2019-01-25)

  • adding new policy
  • fix compiler warnings
  • added comment
  • Contributors: Davide Faconti, Robert Haschke, YiweiHan, janEbert

1.2.0 (2018-11-12)

  • fixed -Wreorder (#24)
    • client code can now compile with -Werror
  • solved compilation problem when convert_impl<float, float>
  • Update README.md
  • Contributors: Davide Faconti, moooeeeep

1.1.1 (2018-04-15)

  • split the project into two packages to reduce dependencies
  • Contributors: Davide Faconti

1.1.0 (2018-03-22)

  • critical bug fix
  • fixed compilation of test
  • remove potential problem in other projects
  • Contributors: Davide Faconti

1.0.2 (2018-02-08)

  • fixing issue with blobs (detected when parsing sensor_msgs::Image)
  • added test for sensor image
  • Contributors: Davide Faconti

1.0.1 (2017-11-14)

  • added return value to deserializeIntoFlatContainer
  • bug fix
  • fix compilation issue
  • fix potential issue with static variables
  • Contributors: Davide Faconti

1.0.0 (2017-10-12)

  • Complete refactoring
  • Contributors: Davide Faconti, Kartik Mohta, Ian Taylor, Mehdi Tlili

0.8.0 (2017-08-30)

  • fixing a serious issue with vectors which are too large
  • Contributors: Davide Faconti

0.7.1 (2017-08-29)

  • ros Time and Duration fixed
  • tests fixed
  • important API Change
  • might fix issue reported in #5. print_number made public
  • adding inline to fix compilation error #4
  • maintain nanosecond precision for time/duration
  • Contributors: Davide Faconti, Ian Taylor

0.6.3 (2017-06-26)

  • speed up
  • yet another bug fixed
  • considerable speed improvement
  • Contributors: Davide Faconti

0.6.2 (2017-06-23)

  • bug fix. types where missing in conversion
  • Contributors: Davide Faconti

0.6.1 (2017-06-22)

  • fixed a bug in resize
  • potential compilation problem fixed
  • Contributors: Davide Faconti

0.6.0 (2017-06-20)

  • moved the deserializing code
  • new API
  • fixing issue in resize (to be tested)
  • fixed osx compilation failure due to implicit_instantiation of std::array
  • Fix formating and typos
  • Contributors: Bo Li, Davide Faconti, Sam Pfeiffer

0.5.1 (2017-04-02)

  • fix the test
  • fix tests?
  • compilation fix
  • typo fix
  • test fixed
  • Contributors: Davide Faconti

0.5.0 (2017-03-25)

  • toStr changed
  • Contributors: Davide Faconti

0.4.3 (2017-02-13)

  • FIX: bug found in cache. reverting the recent change
  • Contributors: davide

0.4.1 (2017-02-09)

  • COSMETIC: more consistent code
  • considerable speed improvement in applyNameTransform
  • Contributors: Davide Faconti

0.4.0 (2017-02-06)

  • critical bug fixed
  • remove compilation warnings
  • Update README.md
  • Contributors: Davide Faconti

0.3.3 (2016-11-04)

  • removed serious bug that might cause double free
  • Contributors: davide

0.3.2 (2016-10-26)

  • fixing tests (EXPECTED_EQ is more informative)
  • changed the type of ROSType::baseName() and added SString::toStdString()

0.3.1 (2016-10-20)

  • added BSD license
  • added an alternative implementation of ShapeShifter

0.3.0 (2016-10-17) -----------

  • Doxygen added
  • Moved to gtests instead of Catch.
  • Final API (?)

0.2.0 (2016-10-17) -----------

  • All unit tests pass, but coverage is not very high.
  • By default is uses the custom string implementation.
  • Stable (?) API

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_type_introspection at Robotics Stack Exchange

ros_type_introspection package from ros_type_introspection repo

ros_type_introspection

Package Summary

Tags No category tags.
Version 2.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/facontidavide/ros_type_introspection.git
VCS Type git
VCS Version master
Last Updated 2020-09-03
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The ros_type_introspection package allows the user to parse and deserialize ROS messages which type is unknown at compilation time.

Additional Links

Maintainers

  • Davide Faconti

Authors

  • Davide Faconti

This library will be discontinued !!!

A large refactoring has been done to create a better and simpler library. All the development effort will be moved there.

Have a look at ros_msg_parser

Ros Message Introspection

This simple library extracts information from a ROS Message, even when its type is unknown at compilation time.

Have you ever wanted to build an app that can subscribe to any topic and extract its content, or can read data from any rosbag? What if the topic and/or the bag contains user defined ROS types ignored at compilation time?

The common solution in the ROS ecosystem is to use Python, that provides the needed introspection. Tools, for instance, like rqt_plot and rqt_bag took this approach. This library implements a C++ alternative.

This library is particularly useful to extract data from two type-erasing classes provided by ROS itself:

  1. topic_tools::ShapeShifter: a type used to subscribe to any topic, regardless of the original type.

  2. rosbag::MessageInstance: the generic type commonly used to read data from a ROS bag.

Please take a look to the examples and unit tests to see how to use the library.

Some background

The ROS Message Types can be described as a Interface Description Language. This approach is very well known and commonly used on the web and in distributed systems in general.

A rosmsg is defined by the user; an “IDL compiler”, i.e. gencpp, reads this schema and generates a header file that contains the source code that the user shall include in his/her applications. The inclusion of this header file is needed on both the publisher and the subscriber sides.

This approach provides strong and type-safe contracts between the producer and the consumer of the message and, additionally, is needed to implements a fast serialization / deserialization mechanism.

The only “problem” is that in very few use cases (for instance if you want to build a plugin to load ROS bags in MATLAB) you don’t know in advance which ROS Messages you will need to read. Therefore, you won’t be able to include the necessary header files.

Acknowledgements

This library is inspired by these other libraries matlab_rosbag and cpp_introspection.

CHANGELOG

Changelog for package ros_type_introspection

2.1.0 (2020-09-03)

  • Removed flyweight and fixed potential conversion errors
  • Update README.md
  • Contributors: Davide Faconti

2.0.4 (2019-11-07)

  • Fix bug reported in plotjuggler
  • Contributors: Davide Faconti

2.0.3 (2019-10-30)

  • critical bug fix
  • fix warning Fix sign comparison warnings
  • Fixed -Wsign-compare warnings
  • Contributors: Davide Faconti, Jarvis Schultz

2.0.2 (2019-10-01)

  • speed optimization (fix regression in 2.0)
  • Contributors: Davide Faconti

2.0.1 (2019-10-01)

  • fix (old abseil stuff)
  • Contributors: Davide Faconti

2.0.0 (2019-10-01)

1.3.3 (2019-05-10)

  • fix issue #36
  • Contributors: Davide Faconti

1.3.2 (2019-04-17)

  • fix issue #35
  • Contributors: Davide Faconti

1.3.1 (2019-03-24)

  • Merge pull request #32 from aeudes/fix_large_array
  • Fix invalid clamp and discard beaviour.
  • Contributors: Alexandre Eudes, Davide Faconti

1.3.0 (2019-01-25)

  • adding new policy
  • fix compiler warnings
  • added comment
  • Contributors: Davide Faconti, Robert Haschke, YiweiHan, janEbert

1.2.0 (2018-11-12)

  • fixed -Wreorder (#24)
    • client code can now compile with -Werror
  • solved compilation problem when convert_impl<float, float>
  • Update README.md
  • Contributors: Davide Faconti, moooeeeep

1.1.1 (2018-04-15)

  • split the project into two packages to reduce dependencies
  • Contributors: Davide Faconti

1.1.0 (2018-03-22)

  • critical bug fix
  • fixed compilation of test
  • remove potential problem in other projects
  • Contributors: Davide Faconti

1.0.2 (2018-02-08)

  • fixing issue with blobs (detected when parsing sensor_msgs::Image)
  • added test for sensor image
  • Contributors: Davide Faconti

1.0.1 (2017-11-14)

  • added return value to deserializeIntoFlatContainer
  • bug fix
  • fix compilation issue
  • fix potential issue with static variables
  • Contributors: Davide Faconti

1.0.0 (2017-10-12)

  • Complete refactoring
  • Contributors: Davide Faconti, Kartik Mohta, Ian Taylor, Mehdi Tlili

0.8.0 (2017-08-30)

  • fixing a serious issue with vectors which are too large
  • Contributors: Davide Faconti

0.7.1 (2017-08-29)

  • ros Time and Duration fixed
  • tests fixed
  • important API Change
  • might fix issue reported in #5. print_number made public
  • adding inline to fix compilation error #4
  • maintain nanosecond precision for time/duration
  • Contributors: Davide Faconti, Ian Taylor

0.6.3 (2017-06-26)

  • speed up
  • yet another bug fixed
  • considerable speed improvement
  • Contributors: Davide Faconti

0.6.2 (2017-06-23)

  • bug fix. types where missing in conversion
  • Contributors: Davide Faconti

0.6.1 (2017-06-22)

  • fixed a bug in resize
  • potential compilation problem fixed
  • Contributors: Davide Faconti

0.6.0 (2017-06-20)

  • moved the deserializing code
  • new API
  • fixing issue in resize (to be tested)
  • fixed osx compilation failure due to implicit_instantiation of std::array
  • Fix formating and typos
  • Contributors: Bo Li, Davide Faconti, Sam Pfeiffer

0.5.1 (2017-04-02)

  • fix the test
  • fix tests?
  • compilation fix
  • typo fix
  • test fixed
  • Contributors: Davide Faconti

0.5.0 (2017-03-25)

  • toStr changed
  • Contributors: Davide Faconti

0.4.3 (2017-02-13)

  • FIX: bug found in cache. reverting the recent change
  • Contributors: davide

0.4.1 (2017-02-09)

  • COSMETIC: more consistent code
  • considerable speed improvement in applyNameTransform
  • Contributors: Davide Faconti

0.4.0 (2017-02-06)

  • critical bug fixed
  • remove compilation warnings
  • Update README.md
  • Contributors: Davide Faconti

0.3.3 (2016-11-04)

  • removed serious bug that might cause double free
  • Contributors: davide

0.3.2 (2016-10-26)

  • fixing tests (EXPECTED_EQ is more informative)
  • changed the type of ROSType::baseName() and added SString::toStdString()

0.3.1 (2016-10-20)

  • added BSD license
  • added an alternative implementation of ShapeShifter

0.3.0 (2016-10-17) -----------

  • Doxygen added
  • Moved to gtests instead of Catch.
  • Final API (?)

0.2.0 (2016-10-17) -----------

  • All unit tests pass, but coverage is not very high.
  • By default is uses the custom string implementation.
  • Stable (?) API

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_type_introspection at Robotics Stack Exchange

ros_type_introspection package from ros_type_introspection repo

ros_type_introspection

Package Summary

Tags No category tags.
Version 2.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/facontidavide/ros_type_introspection.git
VCS Type git
VCS Version master
Last Updated 2020-09-03
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The ros_type_introspection package allows the user to parse and deserialize ROS messages which type is unknown at compilation time.

Additional Links

Maintainers

  • Davide Faconti

Authors

  • Davide Faconti

This library will be discontinued !!!

A large refactoring has been done to create a better and simpler library. All the development effort will be moved there.

Have a look at ros_msg_parser

Ros Message Introspection

This simple library extracts information from a ROS Message, even when its type is unknown at compilation time.

Have you ever wanted to build an app that can subscribe to any topic and extract its content, or can read data from any rosbag? What if the topic and/or the bag contains user defined ROS types ignored at compilation time?

The common solution in the ROS ecosystem is to use Python, that provides the needed introspection. Tools, for instance, like rqt_plot and rqt_bag took this approach. This library implements a C++ alternative.

This library is particularly useful to extract data from two type-erasing classes provided by ROS itself:

  1. topic_tools::ShapeShifter: a type used to subscribe to any topic, regardless of the original type.

  2. rosbag::MessageInstance: the generic type commonly used to read data from a ROS bag.

Please take a look to the examples and unit tests to see how to use the library.

Some background

The ROS Message Types can be described as a Interface Description Language. This approach is very well known and commonly used on the web and in distributed systems in general.

A rosmsg is defined by the user; an “IDL compiler”, i.e. gencpp, reads this schema and generates a header file that contains the source code that the user shall include in his/her applications. The inclusion of this header file is needed on both the publisher and the subscriber sides.

This approach provides strong and type-safe contracts between the producer and the consumer of the message and, additionally, is needed to implements a fast serialization / deserialization mechanism.

The only “problem” is that in very few use cases (for instance if you want to build a plugin to load ROS bags in MATLAB) you don’t know in advance which ROS Messages you will need to read. Therefore, you won’t be able to include the necessary header files.

Acknowledgements

This library is inspired by these other libraries matlab_rosbag and cpp_introspection.

CHANGELOG

Changelog for package ros_type_introspection

2.1.0 (2020-09-03)

  • Removed flyweight and fixed potential conversion errors
  • Update README.md
  • Contributors: Davide Faconti

2.0.4 (2019-11-07)

  • Fix bug reported in plotjuggler
  • Contributors: Davide Faconti

2.0.3 (2019-10-30)

  • critical bug fix
  • fix warning Fix sign comparison warnings
  • Fixed -Wsign-compare warnings
  • Contributors: Davide Faconti, Jarvis Schultz

2.0.2 (2019-10-01)

  • speed optimization (fix regression in 2.0)
  • Contributors: Davide Faconti

2.0.1 (2019-10-01)

  • fix (old abseil stuff)
  • Contributors: Davide Faconti

2.0.0 (2019-10-01)

1.3.3 (2019-05-10)

  • fix issue #36
  • Contributors: Davide Faconti

1.3.2 (2019-04-17)

  • fix issue #35
  • Contributors: Davide Faconti

1.3.1 (2019-03-24)

  • Merge pull request #32 from aeudes/fix_large_array
  • Fix invalid clamp and discard beaviour.
  • Contributors: Alexandre Eudes, Davide Faconti

1.3.0 (2019-01-25)

  • adding new policy
  • fix compiler warnings
  • added comment
  • Contributors: Davide Faconti, Robert Haschke, YiweiHan, janEbert

1.2.0 (2018-11-12)

  • fixed -Wreorder (#24)
    • client code can now compile with -Werror
  • solved compilation problem when convert_impl<float, float>
  • Update README.md
  • Contributors: Davide Faconti, moooeeeep

1.1.1 (2018-04-15)

  • split the project into two packages to reduce dependencies
  • Contributors: Davide Faconti

1.1.0 (2018-03-22)

  • critical bug fix
  • fixed compilation of test
  • remove potential problem in other projects
  • Contributors: Davide Faconti

1.0.2 (2018-02-08)

  • fixing issue with blobs (detected when parsing sensor_msgs::Image)
  • added test for sensor image
  • Contributors: Davide Faconti

1.0.1 (2017-11-14)

  • added return value to deserializeIntoFlatContainer
  • bug fix
  • fix compilation issue
  • fix potential issue with static variables
  • Contributors: Davide Faconti

1.0.0 (2017-10-12)

  • Complete refactoring
  • Contributors: Davide Faconti, Kartik Mohta, Ian Taylor, Mehdi Tlili

0.8.0 (2017-08-30)

  • fixing a serious issue with vectors which are too large
  • Contributors: Davide Faconti

0.7.1 (2017-08-29)

  • ros Time and Duration fixed
  • tests fixed
  • important API Change
  • might fix issue reported in #5. print_number made public
  • adding inline to fix compilation error #4
  • maintain nanosecond precision for time/duration
  • Contributors: Davide Faconti, Ian Taylor

0.6.3 (2017-06-26)

  • speed up
  • yet another bug fixed
  • considerable speed improvement
  • Contributors: Davide Faconti

0.6.2 (2017-06-23)

  • bug fix. types where missing in conversion
  • Contributors: Davide Faconti

0.6.1 (2017-06-22)

  • fixed a bug in resize
  • potential compilation problem fixed
  • Contributors: Davide Faconti

0.6.0 (2017-06-20)

  • moved the deserializing code
  • new API
  • fixing issue in resize (to be tested)
  • fixed osx compilation failure due to implicit_instantiation of std::array
  • Fix formating and typos
  • Contributors: Bo Li, Davide Faconti, Sam Pfeiffer

0.5.1 (2017-04-02)

  • fix the test
  • fix tests?
  • compilation fix
  • typo fix
  • test fixed
  • Contributors: Davide Faconti

0.5.0 (2017-03-25)

  • toStr changed
  • Contributors: Davide Faconti

0.4.3 (2017-02-13)

  • FIX: bug found in cache. reverting the recent change
  • Contributors: davide

0.4.1 (2017-02-09)

  • COSMETIC: more consistent code
  • considerable speed improvement in applyNameTransform
  • Contributors: Davide Faconti

0.4.0 (2017-02-06)

  • critical bug fixed
  • remove compilation warnings
  • Update README.md
  • Contributors: Davide Faconti

0.3.3 (2016-11-04)

  • removed serious bug that might cause double free
  • Contributors: davide

0.3.2 (2016-10-26)

  • fixing tests (EXPECTED_EQ is more informative)
  • changed the type of ROSType::baseName() and added SString::toStdString()

0.3.1 (2016-10-20)

  • added BSD license
  • added an alternative implementation of ShapeShifter

0.3.0 (2016-10-17) -----------

  • Doxygen added
  • Moved to gtests instead of Catch.
  • Final API (?)

0.2.0 (2016-10-17) -----------

  • All unit tests pass, but coverage is not very high.
  • By default is uses the custom string implementation.
  • Stable (?) API

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_type_introspection at Robotics Stack Exchange

No version for distro hydro. Known supported distros are highlighted in the buttons above.

ros_type_introspection package from ros_type_introspection repo

ros_type_introspection

Package Summary

Tags No category tags.
Version 2.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/facontidavide/ros_type_introspection.git
VCS Type git
VCS Version master
Last Updated 2020-09-03
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The ros_type_introspection package allows the user to parse and deserialize ROS messages which type is unknown at compilation time.

Additional Links

Maintainers

  • Davide Faconti

Authors

  • Davide Faconti

This library will be discontinued !!!

A large refactoring has been done to create a better and simpler library. All the development effort will be moved there.

Have a look at ros_msg_parser

Ros Message Introspection

This simple library extracts information from a ROS Message, even when its type is unknown at compilation time.

Have you ever wanted to build an app that can subscribe to any topic and extract its content, or can read data from any rosbag? What if the topic and/or the bag contains user defined ROS types ignored at compilation time?

The common solution in the ROS ecosystem is to use Python, that provides the needed introspection. Tools, for instance, like rqt_plot and rqt_bag took this approach. This library implements a C++ alternative.

This library is particularly useful to extract data from two type-erasing classes provided by ROS itself:

  1. topic_tools::ShapeShifter: a type used to subscribe to any topic, regardless of the original type.

  2. rosbag::MessageInstance: the generic type commonly used to read data from a ROS bag.

Please take a look to the examples and unit tests to see how to use the library.

Some background

The ROS Message Types can be described as a Interface Description Language. This approach is very well known and commonly used on the web and in distributed systems in general.

A rosmsg is defined by the user; an “IDL compiler”, i.e. gencpp, reads this schema and generates a header file that contains the source code that the user shall include in his/her applications. The inclusion of this header file is needed on both the publisher and the subscriber sides.

This approach provides strong and type-safe contracts between the producer and the consumer of the message and, additionally, is needed to implements a fast serialization / deserialization mechanism.

The only “problem” is that in very few use cases (for instance if you want to build a plugin to load ROS bags in MATLAB) you don’t know in advance which ROS Messages you will need to read. Therefore, you won’t be able to include the necessary header files.

Acknowledgements

This library is inspired by these other libraries matlab_rosbag and cpp_introspection.

CHANGELOG

Changelog for package ros_type_introspection

2.1.0 (2020-09-03)

  • Removed flyweight and fixed potential conversion errors
  • Update README.md
  • Contributors: Davide Faconti

2.0.4 (2019-11-07)

  • Fix bug reported in plotjuggler
  • Contributors: Davide Faconti

2.0.3 (2019-10-30)

  • critical bug fix
  • fix warning Fix sign comparison warnings
  • Fixed -Wsign-compare warnings
  • Contributors: Davide Faconti, Jarvis Schultz

2.0.2 (2019-10-01)

  • speed optimization (fix regression in 2.0)
  • Contributors: Davide Faconti

2.0.1 (2019-10-01)

  • fix (old abseil stuff)
  • Contributors: Davide Faconti

2.0.0 (2019-10-01)

1.3.3 (2019-05-10)

  • fix issue #36
  • Contributors: Davide Faconti

1.3.2 (2019-04-17)

  • fix issue #35
  • Contributors: Davide Faconti

1.3.1 (2019-03-24)

  • Merge pull request #32 from aeudes/fix_large_array
  • Fix invalid clamp and discard beaviour.
  • Contributors: Alexandre Eudes, Davide Faconti

1.3.0 (2019-01-25)

  • adding new policy
  • fix compiler warnings
  • added comment
  • Contributors: Davide Faconti, Robert Haschke, YiweiHan, janEbert

1.2.0 (2018-11-12)

  • fixed -Wreorder (#24)
    • client code can now compile with -Werror
  • solved compilation problem when convert_impl<float, float>
  • Update README.md
  • Contributors: Davide Faconti, moooeeeep

1.1.1 (2018-04-15)

  • split the project into two packages to reduce dependencies
  • Contributors: Davide Faconti

1.1.0 (2018-03-22)

  • critical bug fix
  • fixed compilation of test
  • remove potential problem in other projects
  • Contributors: Davide Faconti

1.0.2 (2018-02-08)

  • fixing issue with blobs (detected when parsing sensor_msgs::Image)
  • added test for sensor image
  • Contributors: Davide Faconti

1.0.1 (2017-11-14)

  • added return value to deserializeIntoFlatContainer
  • bug fix
  • fix compilation issue
  • fix potential issue with static variables
  • Contributors: Davide Faconti

1.0.0 (2017-10-12)

  • Complete refactoring
  • Contributors: Davide Faconti, Kartik Mohta, Ian Taylor, Mehdi Tlili

0.8.0 (2017-08-30)

  • fixing a serious issue with vectors which are too large
  • Contributors: Davide Faconti

0.7.1 (2017-08-29)

  • ros Time and Duration fixed
  • tests fixed
  • important API Change
  • might fix issue reported in #5. print_number made public
  • adding inline to fix compilation error #4
  • maintain nanosecond precision for time/duration
  • Contributors: Davide Faconti, Ian Taylor

0.6.3 (2017-06-26)

  • speed up
  • yet another bug fixed
  • considerable speed improvement
  • Contributors: Davide Faconti

0.6.2 (2017-06-23)

  • bug fix. types where missing in conversion
  • Contributors: Davide Faconti

0.6.1 (2017-06-22)

  • fixed a bug in resize
  • potential compilation problem fixed
  • Contributors: Davide Faconti

0.6.0 (2017-06-20)

  • moved the deserializing code
  • new API
  • fixing issue in resize (to be tested)
  • fixed osx compilation failure due to implicit_instantiation of std::array
  • Fix formating and typos
  • Contributors: Bo Li, Davide Faconti, Sam Pfeiffer

0.5.1 (2017-04-02)

  • fix the test
  • fix tests?
  • compilation fix
  • typo fix
  • test fixed
  • Contributors: Davide Faconti

0.5.0 (2017-03-25)

  • toStr changed
  • Contributors: Davide Faconti

0.4.3 (2017-02-13)

  • FIX: bug found in cache. reverting the recent change
  • Contributors: davide

0.4.1 (2017-02-09)

  • COSMETIC: more consistent code
  • considerable speed improvement in applyNameTransform
  • Contributors: Davide Faconti

0.4.0 (2017-02-06)

  • critical bug fixed
  • remove compilation warnings
  • Update README.md
  • Contributors: Davide Faconti

0.3.3 (2016-11-04)

  • removed serious bug that might cause double free
  • Contributors: davide

0.3.2 (2016-10-26)

  • fixing tests (EXPECTED_EQ is more informative)
  • changed the type of ROSType::baseName() and added SString::toStdString()

0.3.1 (2016-10-20)

  • added BSD license
  • added an alternative implementation of ShapeShifter

0.3.0 (2016-10-17) -----------

  • Doxygen added
  • Moved to gtests instead of Catch.
  • Final API (?)

0.2.0 (2016-10-17) -----------

  • All unit tests pass, but coverage is not very high.
  • By default is uses the custom string implementation.
  • Stable (?) API

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Deps
topic_switch

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_type_introspection at Robotics Stack Exchange

ros_type_introspection package from ros_type_introspection repo

ros_type_introspection

Package Summary

Tags No category tags.
Version 2.1.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/facontidavide/ros_type_introspection.git
VCS Type git
VCS Version master
Last Updated 2020-09-03
Dev Status DEVELOPED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The ros_type_introspection package allows the user to parse and deserialize ROS messages which type is unknown at compilation time.

Additional Links

Maintainers

  • Davide Faconti

Authors

  • Davide Faconti

This library will be discontinued !!!

A large refactoring has been done to create a better and simpler library. All the development effort will be moved there.

Have a look at ros_msg_parser

Ros Message Introspection

This simple library extracts information from a ROS Message, even when its type is unknown at compilation time.

Have you ever wanted to build an app that can subscribe to any topic and extract its content, or can read data from any rosbag? What if the topic and/or the bag contains user defined ROS types ignored at compilation time?

The common solution in the ROS ecosystem is to use Python, that provides the needed introspection. Tools, for instance, like rqt_plot and rqt_bag took this approach. This library implements a C++ alternative.

This library is particularly useful to extract data from two type-erasing classes provided by ROS itself:

  1. topic_tools::ShapeShifter: a type used to subscribe to any topic, regardless of the original type.

  2. rosbag::MessageInstance: the generic type commonly used to read data from a ROS bag.

Please take a look to the examples and unit tests to see how to use the library.

Some background

The ROS Message Types can be described as a Interface Description Language. This approach is very well known and commonly used on the web and in distributed systems in general.

A rosmsg is defined by the user; an “IDL compiler”, i.e. gencpp, reads this schema and generates a header file that contains the source code that the user shall include in his/her applications. The inclusion of this header file is needed on both the publisher and the subscriber sides.

This approach provides strong and type-safe contracts between the producer and the consumer of the message and, additionally, is needed to implements a fast serialization / deserialization mechanism.

The only “problem” is that in very few use cases (for instance if you want to build a plugin to load ROS bags in MATLAB) you don’t know in advance which ROS Messages you will need to read. Therefore, you won’t be able to include the necessary header files.

Acknowledgements

This library is inspired by these other libraries matlab_rosbag and cpp_introspection.

CHANGELOG

Changelog for package ros_type_introspection

2.1.0 (2020-09-03)

  • Removed flyweight and fixed potential conversion errors
  • Update README.md
  • Contributors: Davide Faconti

2.0.4 (2019-11-07)

  • Fix bug reported in plotjuggler
  • Contributors: Davide Faconti

2.0.3 (2019-10-30)

  • critical bug fix
  • fix warning Fix sign comparison warnings
  • Fixed -Wsign-compare warnings
  • Contributors: Davide Faconti, Jarvis Schultz

2.0.2 (2019-10-01)

  • speed optimization (fix regression in 2.0)
  • Contributors: Davide Faconti

2.0.1 (2019-10-01)

  • fix (old abseil stuff)
  • Contributors: Davide Faconti

2.0.0 (2019-10-01)

1.3.3 (2019-05-10)

  • fix issue #36
  • Contributors: Davide Faconti

1.3.2 (2019-04-17)

  • fix issue #35
  • Contributors: Davide Faconti

1.3.1 (2019-03-24)

  • Merge pull request #32 from aeudes/fix_large_array
  • Fix invalid clamp and discard beaviour.
  • Contributors: Alexandre Eudes, Davide Faconti

1.3.0 (2019-01-25)

  • adding new policy
  • fix compiler warnings
  • added comment
  • Contributors: Davide Faconti, Robert Haschke, YiweiHan, janEbert

1.2.0 (2018-11-12)

  • fixed -Wreorder (#24)
    • client code can now compile with -Werror
  • solved compilation problem when convert_impl<float, float>
  • Update README.md
  • Contributors: Davide Faconti, moooeeeep

1.1.1 (2018-04-15)

  • split the project into two packages to reduce dependencies
  • Contributors: Davide Faconti

1.1.0 (2018-03-22)

  • critical bug fix
  • fixed compilation of test
  • remove potential problem in other projects
  • Contributors: Davide Faconti

1.0.2 (2018-02-08)

  • fixing issue with blobs (detected when parsing sensor_msgs::Image)
  • added test for sensor image
  • Contributors: Davide Faconti

1.0.1 (2017-11-14)

  • added return value to deserializeIntoFlatContainer
  • bug fix
  • fix compilation issue
  • fix potential issue with static variables
  • Contributors: Davide Faconti

1.0.0 (2017-10-12)

  • Complete refactoring
  • Contributors: Davide Faconti, Kartik Mohta, Ian Taylor, Mehdi Tlili

0.8.0 (2017-08-30)

  • fixing a serious issue with vectors which are too large
  • Contributors: Davide Faconti

0.7.1 (2017-08-29)

  • ros Time and Duration fixed
  • tests fixed
  • important API Change
  • might fix issue reported in #5. print_number made public
  • adding inline to fix compilation error #4
  • maintain nanosecond precision for time/duration
  • Contributors: Davide Faconti, Ian Taylor

0.6.3 (2017-06-26)

  • speed up
  • yet another bug fixed
  • considerable speed improvement
  • Contributors: Davide Faconti

0.6.2 (2017-06-23)

  • bug fix. types where missing in conversion
  • Contributors: Davide Faconti

0.6.1 (2017-06-22)

  • fixed a bug in resize
  • potential compilation problem fixed
  • Contributors: Davide Faconti

0.6.0 (2017-06-20)

  • moved the deserializing code
  • new API
  • fixing issue in resize (to be tested)
  • fixed osx compilation failure due to implicit_instantiation of std::array
  • Fix formating and typos
  • Contributors: Bo Li, Davide Faconti, Sam Pfeiffer

0.5.1 (2017-04-02)

  • fix the test
  • fix tests?
  • compilation fix
  • typo fix
  • test fixed
  • Contributors: Davide Faconti

0.5.0 (2017-03-25)

  • toStr changed
  • Contributors: Davide Faconti

0.4.3 (2017-02-13)

  • FIX: bug found in cache. reverting the recent change
  • Contributors: davide

0.4.1 (2017-02-09)

  • COSMETIC: more consistent code
  • considerable speed improvement in applyNameTransform
  • Contributors: Davide Faconti

0.4.0 (2017-02-06)

  • critical bug fixed
  • remove compilation warnings
  • Update README.md
  • Contributors: Davide Faconti

0.3.3 (2016-11-04)

  • removed serious bug that might cause double free
  • Contributors: davide

0.3.2 (2016-10-26)

  • fixing tests (EXPECTED_EQ is more informative)
  • changed the type of ROSType::baseName() and added SString::toStdString()

0.3.1 (2016-10-20)

  • added BSD license
  • added an alternative implementation of ShapeShifter

0.3.0 (2016-10-17) -----------

  • Doxygen added
  • Moved to gtests instead of Catch.
  • Final API (?)

0.2.0 (2016-10-17) -----------

  • All unit tests pass, but coverage is not very high.
  • By default is uses the custom string implementation.
  • Stable (?) API

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_type_introspection at Robotics Stack Exchange