Example: Feedback receiver
This page contains a step by step guide to run the streaming receiver example. The example will:
Configure the desired feedback message frequencies and endpoint via RobFlow API message
Set up a UDP receiver at the specified endpoint
Listen for messages and interpret and print them once received
To find the example, please visit the RobCo GitLab: Streaming Receiver Example
1. Setting up
The first step is to connect to the control unit, as explained in the getting started section.
Afterwards, open a browser and open RobFlow via the IP address, as obtained from the previous step. If this is the first connection to the robot, please set a password. Otherwise use the existing credentials to login.
After completing these two steps, you’ve defined:
username: The username used to login to RobFlow
password: The password used to login to RobFlow
robot-ip-robflow: The IP at which the Robot (specifically RobFlow) can be found
2. Define receiving endpoint
The next step is to define where the controller should send the feedback messages. Depending on the connection mode chosen in 1. your host will either have a static or dynamic IP assigned for the respective network adapter.
The port at which feedback messages are received is free to chose. There should be no other traffic expected at the given port.
After completing this step, you’ve defined:
host-ip-feedback: The IP of the host that should receive the feedback messages
host-port-feedback: The Port at which the host should receive the feedback messages
3. Define message types and feedback frequency
Lastly, it’s required to define which messages should be sent and at which frequency.
Generally, you are free to chose any frequency for any message. If the transceiver is unable to transmit at the desired rate, it will reduce the configured frequency to a feasible value. To reduce jitter and improve robustness, we suggest to limit the total number of feedback messages to 500 per second.
For information on the available messages, please refer to Feedback Messages.
After completing this step, you’ve defined:
f-feedback-status: The frequency at which streaming status feedback messages are sent
f-feedback-cartesian-pose: The frequency at which cartesian pose feedback messages are sent
f-feedback-joint-pose: The frequency at which joint angle feedback messages are sent
4. Run the example
After completing all steps above, everything is setup to run the example.
Download the RobFlow SDK and install according to the readme.
Finally, the example can be run (inserting the respective arguments obtained in the steps above):
python3 -m streaming.examples.receiver \
--username my_user \
--password my_password \
--robot-ip-robflow 192.168.1.1 \
--robot-port-robflow 80 \
--host-ip-feedback 192.168.1.99 \
--host-port-feedback 28001 \
--f-feedback-status 10 \
--f-feedback-cartesian-pose 10 \
--f-feedback-joint-pose 10