-
Notifications
You must be signed in to change notification settings - Fork 278
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
Passing data to multiple instances of HardwareInterface from control node #1486
Comments
Do you need to share data at run-time, or only at loading/initialization of the different components? |
@tenfoldpaper maybe implementation of |
Sorry for the late reply! Since data is only accessed in the controller's read and write loops (and read and written in those parts), there shouldn't be major issues, as from what I can tell, the respective HardwareInterfaces' read and write functions are executed serially. There is a mujoco-ros-control repo for ROS1 I found before that did the whole manual initialization thing, which made this possible. So far, I haven't been able to find a solution to this yet. |
I'll take a look at it in a couple days and update my comment on this, but thank you for the suggestion! |
So I went through Since MuJoCo needs to be initialized and executed directly in @christophfroehlich , do you know any way to implement what I asked in the opening post? |
No I don't know a way to pass data between different hardware components. But maybe I don't understand your problem correctly: You will have to use different hardware components anyways, one (set) for your robot, and another one (set) for your simulation. For example, two hardware components for your real hardware (arm + base), but a single monolithic one for mujoco? |
@tenfoldpaper Maybe what you are looking for is a |
as far as I understood he wants to share data between components which are not known altogether at compile time, but loaded dynamically. |
Hi, I've been working on a mujoco integration of the Panda robot arm into ros2-control.
So far, I've had some success simulating multiple robots, but only by creating the simulation loop inside the HardwareInterface class itself. While I can control and do things with it, when it comes to combining multiple hardware interfaces together (e.g. the robot arm mounted on a mobile base with its own HardwareInterface class), this structure would require me to write a monolothic HardwareInterface class that combines both of these together.
I've taken a look at the linked mujoco integration repo, and it appears that they are also doing something similar.
From what I can tell, in ros-control, we had a more fine-grained control over how to initialize the Interface classes, as it had a constructor and we could initialize the HardwareInterface-equivalent with an argument to simulate multiple components all sharing the same data source.
Is this a feature that is also available in ros2-control? If so, how do you do this? Apologies in advance for asking something that may be basic, but I could not find any relevant code bases that address this issue.
The text was updated successfully, but these errors were encountered: