Sign inSign up

aswinajayan/doosan_ctrl

By aswinajayan

•Updated over 2 years ago

Docker for running doosan_robot emulator with ROS2: humble with GUI #rdoosan

Image
Languages & frameworks
0

86

aswinajayan/doosan_ctrl repository overview

⁠Building.

docker build -t doosan_ctrl:ros2 .

⁠Usage

⁠Running the docker

to avail GUI, you might have to disable access control. you can do that by running xhost + on your ubuntu system.

xhost + 
docker run -it --rm --net=host \
    --privileged \
    --name="doosan_ctrl" \
    -e "DISPLAY=$DISPLAY" \
    -e "QT_X11_NO_MITSHM=1" \
    -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    -e "XAUTHORITY=$XAUTH" \
doosan_ctrl:ros2 bash

docker adds the setup.bash scripts to bashrc. so you dont have to source it in every terminal

⁠Running the simulation

you can start the doosan emulator by running on your docker shell

ros2 launch dsr_launcher2 dsr_joint_state_pub.launch.py model:=a0912 color:=blue

Detailed information is available in Doosan Official Repository⁠

⁠Getting additional terminals

docker exec -it doosan_ctrl bash

⁠Disclaimer

I am not a part of Doosan group or a contributor to any of these repositories. This is just a dockerisation of the exact instructions in the Doosan Official Repository⁠

Hope this helps some one in need

#Dockerfile

FROM osrf/ros:foxy-desktop

RUN apt-get update && \
    apt-get install -y ros-foxy-control-msgs \
    ros-foxy-realtime-tools \
    ros-foxy-xacro \
    ros-foxy-joint-state-publisher-gui \
    ros-foxy-object-recognition-msgs \
    ros-foxy-octomap-msgs \
    ros-foxy-gazebo-ros \
    ros-foxy-gazebo-ros-pkgs \
    ros-foxy-control-toolbox libpoco-dev

SHELL ["/bin/bash", "-c"]
RUN mkdir -p /root/ros2_ws/src && echo "source /opt/ros/foxy/setup.bash" >> /root/.bashrc && \
    cd /root/ros2_ws/src/ && \
    git clone https://github.com/doosan-robotics/doosan-robot2.git && \
    git clone https://github.com/ros-controls/ros2_control.git && \
    git clone https://github.com/ros-controls/ros2_controllers.git && \
    git clone https://github.com/ros-simulation/gazebo_ros2_control.git && \
    cd ros2_control && git reset --hard 3dc62e28e3bc8cf636275825526c11d13b554bb6 && cd .. && \
    cd ros2_controllers && git reset --hard 83c494f460f1c8675f4fdd6fb8707b87e81cb197 && cd .. && \
    cd gazebo_ros2_control && git reset --hard 3dfe04d412d5be4540752e9c1165ccf25d7c51fb && cd .. && \
    git clone -b ros2 --single-branch https://github.com/ros-planning/moveit_msgs

WORKDIR /root/ros2_ws
RUN /bin/bash -c "source /opt/ros/foxy/setup.bash; colcon build" && echo "source /root/ros2_ws/install/setup.bash" >> /root/.bashrc
CMD ["bash"]

Tag summary

Content type

Image

Digest

sha256:457abb8a0…

Size

1.2 GB

Last updated

over 2 years ago

docker pull aswinajayan/doosan_ctrl:ros2