examples.custom_msgs package
Submodules
examples.custom_msgs.ros2_message_example module
A message publisher and listener for ROS 2 messages using Wrapyfi.
This script demonstrates the capability to transmit ROS 2 messages, specifically geometry_msgs/Pose and std_msgs/String, using the MiddlewareCommunicator within the Wrapyfi library. The communication follows the PUB/SUB pattern allowing message publishing and listening functionalities between processes or machines.
- Demonstrations:
Using the ROS 2 message
Transmitting std_msgs/String and geometry_msgs/Pose ROS 2 messages
Applying the PUB/SUB pattern with channeling and mirroring
- Requirements:
Wrapyfi: Middleware communication wrapper (refer to the Wrapyfi documentation for installation instructions)
ROS 2, rclpy: Used for handling and creating ROS 2 messages (refer to the Wrapyfi documentation for installation instructions)
Ensure ROS 2 is installed and the required message types are available.
- Run:
- # On machine 1 (or process 1): Publisher waits for keyboard input and transmits message
python3 ros2_message_example.py --mode publish
- # On machine 2 (or process 2): Listener waits for message and prints the received ROS 2 messages
python3 ros2_message_example.py --mode listen
- class examples.custom_msgs.ros2_message_example.Notifier[source]
Bases:
MiddlewareCommunicator
examples.custom_msgs.ros_message_example module
A message publisher and listener for ROS messages using Wrapyfi.
This script demonstrates the capability to transmit ROS messages, specifically geometry_msgs/Pose and std_msgs/String, using the MiddlewareCommunicator within the Wrapyfi library. The communication follows the PUB/SUB pattern allowing message publishing and listening functionalities between processes or machines.
- Demonstrations:
Using the ROS message
Transmitting std_msgs/String and geometry_msgs/Pose ROS messages
Applying the PUB/SUB pattern with channeling and mirroring
- Requirements:
Wrapyfi: Middleware communication wrapper (refer to the Wrapyfi documentation for installation instructions)
ROS, ROSPy: Used for handling and creating ROS messages (refer to the Wrapyfi documentation for installation instructions)
Ensure ROS is installed and the required message types are available.
- Run:
- # On machine 1 (or process 1): Publisher waits for keyboard input and transmits message
python3 ros_message_example.py --mode publish
- # On machine 2 (or process 2): Listener waits for message and prints the received ROS messages
python3 ros_message_example.py --mode listen
- class examples.custom_msgs.ros_message_example.Notifier[source]
Bases:
MiddlewareCommunicator