Git Product home page Git Product logo

Comments (8)

christophfroehlich avatar christophfroehlich commented on July 27, 2024

Do you need to share data at run-time, or only at loading/initialization of the different components?

from ros2_control.

destogl avatar destogl commented on July 27, 2024

@tenfoldpaper maybe implementation of gz_ros2_control is interesting in this regard for you? Can you check it?

from ros2_control.

tenfoldpaper avatar tenfoldpaper commented on July 27, 2024

Do you need to share data at run-time, or only at loading/initialization of the different components?

Sorry for the late reply!
I need to share data at run-time. Generally, this should be possible by passing a reference to the mjData* and mjModel* pointers that get instantiated when loading up the scene using Mujoco. So far I've managed that successfully with member variable classes.

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.

from ros2_control.

tenfoldpaper avatar tenfoldpaper commented on July 27, 2024

@tenfoldpaper maybe implementation of gz_ros2_control is interesting in this regard for you? Can you check it?

I'll take a look at it in a couple days and update my comment on this, but thank you for the suggestion!

from ros2_control.

tenfoldpaper avatar tenfoldpaper commented on July 27, 2024

So I went through gz_ros2_control, and it appears that the way it is handling ros2-control is not really transferable to MuJoCo.
It seems to work based on Gazebo's Plugin interface, which seems to create instances of ros2-control objects inside the simulation directly.

Since MuJoCo needs to be initialized and executed directly in ros2-control in the main control node, and there is no easy way to create a similar plugin-like interface for it, unfortunately it does not solve the problem.

@christophfroehlich , do you know any way to implement what I asked in the opening post?

from ros2_control.

christophfroehlich avatar christophfroehlich commented on July 27, 2024

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?

from ros2_control.

saikishor avatar saikishor commented on July 27, 2024

@tenfoldpaper Maybe what you are looking for is a System HardwareComponents, where multiple actuators can coexist and share information.

from ros2_control.

christophfroehlich avatar christophfroehlich commented on July 27, 2024

@tenfoldpaper Maybe what you are looking for is a System HardwareComponents, where multiple actuators can coexist and share information.

as far as I understood he wants to share data between components which are not known altogether at compile time, but loaded dynamically.

from ros2_control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.