-
 
No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro iron. 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.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
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 lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.

ros_wild package from ros_wild repo

ros_wild

Package Summary

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

Repository Summary

Checkout URI https://github.com/yuma-m/ros_wild.git
VCS Type git
VCS Version master
Last Updated 2016-12-19
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_wild package

Additional Links

Maintainers

  • Yuma Mihira

Authors

  • Yuma Mihira

ros_wild wercker status

Wildcard Subscriber and Publisher for ROS (Python only).

Installation

$ sudo apt install ros-kinetic-ros-wild

or

$ cd /path/to/your/catkin_ws/src/
$ git clone https://github.com/yuma-m/ros_wild.git
$ cd ../
$ catkin_make

Usage

Example scripts are placed in example directory.

Command line

Echo multiple topics

$ rosrun ros_wild echo ".*_sensor"
---
topic: /ultrasound_sensor
type: sensor_msgs/Range

header:
  seq: 1
  stamp:
    secs: 1478776655
    nsecs:    143582
  frame_id: ultrasound_sensor
radiation_type: 0
field_of_view: 0.569999992847
min_range: 0.20000000298
max_range: 3.0
range: 0.600000023842
---
topic: /infrared_sensor
type: sensor_msgs/Range

header:
  seq: 2
  stamp:
    secs: 1478776656
    nsecs:    998511
  frame_id: infrared_sensor
radiation_type: 1
field_of_view: 0.00999999977648
min_range: 0.00999999977648
max_range: 1.0
range: 0.20000000298

Python

Wildcard Subscriber

>>> from ros_wild import Subscriber

# subscribe to all Log topics
>>> sub = Subscriber(r"/rosout.*")
>>> sub.subscribed_topics
['/rosout', '/rosout_agg']

# unsubscribe from all topics
>>> sub.unregister_all()
>>> sub.subscribed_topics
[]

# resubscribe to topics
>>> sub.reload_topics()
>>> sub.subscribed_topics
['/rosout', '/rosout_agg']

Register Callback

>>> from ros_wild import Subscriber
>>> from std_msgs.msg import Bool, String

>>> def callback_bool(msg):
>>>     print("bool is {}".format(msg.data))

>>> def callback_string(msg):
>>>     print("string is {}".format(msg.data))

# subscribe without callback
>>> sub = Subscriber(r".+")
>>> print("Subscribed topics are {}".format(sub.subscribed_topics))
Subscribed topics are ['/bool/01', '/rosout', 'rosout_agg', '/string/01']

# register callback
>>> sub.register_callback(Bool, callback_bool)
>>> sub.register_callback(String, callback_string)
>>> print("Topics with callback are {}".format(sub.topics_with_callback))
Topics with callaback are ['/bool/01', '/strings/01']

Wildcard Publisher

The code below will publish Log message to /rosout and /rosout_agg topics.

>>> import rospy
>>> from ros_wild import Publisher
>>> from rosgraph_msgs.msg import Log

# publish to all topics
>>> rospy.init_node("test")
>>> pub = Publisher(".*", queue_size=1)
>>> pub.published_topics
['/rosout', '/rosout_agg', '/tf', ... ]
>>> pub.publish(Log(msg="this is test message"))

CHANGELOG

Changelog for package ros_wild

0.5.0 (2016-12-14)

  • Fix CMakeLists.txt
  • Release package

0.4.2 (2016-11-18)

  • Add tests for publisher and subscriber
  • Add topics_with/without_callback method for subscriber

0.4.1 (2016-11-17)

  • Register callback by data class to wildcard subscriber

0.4.0 (2016-11-17)

  • Modify publisher and subscriber to create instance without specifying data class

0.3.0 (2016-11-10)

  • Create a node to echo topics

0.2.0 (2016-11-10)

  • Create wildcard publisher

0.1.0 (2016-11-09)

  • Create wildcard subscriber

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_wild at Robotics Stack Exchange

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