Coder Social home page Coder Social logo

Comments (6)

pablogs9 avatar pablogs9 commented on June 15, 2024 1

We have tested the scenario with the expected results:

  • Docker 1:

    • Set FASTRTPS_DEFAULT_PROFILES_FILE to a file containing your XML file
    • Instantiate a micro-ROS Agent using ros2 run micro_ros_agent ...
    • Connect a micro-ROS client
  • Docker 2:

    • Set FASTRTPS_DEFAULT_PROFILES_FILE to a file containing your XML file
    • Instantiate a Discovery Server using fastdds discovery --server-id 0 --ip-address 127.0.0.1 --port 11811
    • Check if we can reach the topics using ros2 topic list

Both docker has been intantiated using:

docker run \
    -it \
    --net=host \
    - v /dev:/dev \
    --privileged \
    -e DISPLAY=$DISPLAY \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    [image]

Could you provide precise steps for creating a scenario where we can reproduce your issue?

from docker.

jparisu avatar jparisu commented on June 15, 2024

Hello @aditya2592

In order to help you with your issue, we will need more information regarding your scenario and the nodes running.

Configuration file seems fine, and it looks like it is being loaded correctly.
So, I would say the problem here is about reaching the Server (Discovery Server).
The node that works as Discovery Server needs to be running in order for a Super Client to connect with the network (and get discovery information). Do you have a Discovery Server running? If so, are you sure it is listening in the locator you have set 127.0.0.1::11811 and it is recheable from the ros2 daemon (the node in charge of executing ros2 topic list.

Please, check this tutorial and make sure you are running a Discovery Server and that your ros2 daemon is configured as a super client : #84 (or else, you can configure your ros2 daemon as the Discovery Server if you do not have one in your scenario).
If you have further questions, please let us know and retrieve more information about your specific use case.

from docker.

aditya2592 avatar aditya2592 commented on June 15, 2024

Hi @jparisu, yes the discovery server is running through another docker container using the IP address and port in above config. We use the discovery server for all other services, subscribers and publishers that are present on the host PC itself and it works as expected in code and on the daemon. Regarding configuring the daemon as super client, is_default_profile="true" flag should take care of that right?

from docker.

aditya2592 avatar aditya2592 commented on June 15, 2024

Is the DomainParticipant in the agent code compatible with using a participant profile that points to discovery server as the discovery protocol? Or does it mess up its discovery of information coming from the nucleo board running microros?

from docker.

aditya2592 avatar aditya2592 commented on June 15, 2024

Adding some more info, discovery server is launched using docker-compose below:


    discovery_server:
        image: <custom image built off ros-galactic-ros-base>
        container_name: discovery_server
        network_mode: host
        ipc: host
        volumes:
            - /dev:/dev
        stop_signal: SIGINT
        privileged: true
        command: fastdds discovery --server-id 0 --ip-address 127.0.0.1 --port 11811
     

And then the agent + ROS daemon commands are in another docker instance launched through compose:

    moveit:
        image: <same image as above>
        depends_on:
            - discovery_server
        logging:
            driver: "json-file"
            options:
                max-size: "20m"
                max-file: "10"
        privileged: true
        container_name: moveit
        network_mode: host
        ipc: host
        init: true
        environment:
            - DISPLAY=$DISPLAY
            - QT_X11_NO_MITSHM=1
            - PYTHONFAULTHANDLER=1
            - NVIDIA_VISIBLE_DEVICES=all
            - NVIDIA_DRIVER_CAPABILITIES=all
        command: ros2 launch micro_ros_agent micro_ros_agent_launch.py
        stop_signal: SIGINT

Both the above instances are using the same super client config that I posed in my earlier message. Then I docker exec into the moveit container from above list and try to do ros2 topic list. In another experiment, I tried to do everything in the same docker instance and I am able to list and echo the topic. However it doesn't work across docker instances.

from docker.

aditya2592 avatar aditya2592 commented on June 15, 2024

This works now! I had to build the agent package as part of our ROS image and launch the agent through that image using docker-compose

from docker.

Related Issues (12)

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.