-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Acquiring System State Variables from ROS Ecosystem (From other nodes and services) - DIFFBOT #1465
Comments
The typical ros2_control approach is to write a controller to interact (from ROS via topics, services) with the hardware component. Have a look at this example of a GPIO controller. |
Hello @christophfroehlich,
Code:
|
Hello,
I am trying to implement the controller interface for my differential robot with read motor feedback and setMotorValues function that are present in my read and write functions and the last variable digstate manages another actuator I use in my robot on top of the left wheel and right wheel. I need to read the status of my robot from my ros ecosystem through other nodes via topics and depending on that I would manipulate the last extra variable (digState) I would be sending to my arduino via write function. I should update the ros ecosystem as soon as I get a feedback from the arduino through the last extra variable through read function.
Approach #1:
I tried implementing a subscriber node inside my hardware interface node but the callback function is not called and I noticed that it is kind of a limitation, correct me if I am wrong.
Approach #2:
After that, I also tried implemented a service server node (standalone node) and a a client (in hardware interface) that takes the service request and changes the internal variable digState to write to my teensy MC. Async request doesn't work but waiting till the service call is successful (spin until future) works but it affects the other syncing processes and blocks the entire main thread.
Please let me know how I can to this?
Read and Write Functions:
If goal is reached digOn becomes true and passed from the server:
.hFile:
The problem I am facing is acquiring the information from other ros nodes to hardware interface.
The text was updated successfully, but these errors were encountered: