diff --git a/README.md b/README.md index 95c933b..e63b03e 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ docker build -t ros2_humble:latest ROS 2_Humble After all the containers are successfully built and the bridge network is established we can now start both containers. On one terminal run the following command to start the URSim container ```bash -docker run -it --rm -p 6080:6080 --network ros_ursim ursim:latest +docker run -it --name URSIM -p 6080:6080 -p50002:50002 --network ros_ursim ursim:latest ``` When successfully started this container will print its IP address in the terminal. Note this down: @@ -73,12 +73,12 @@ IP address of the simulator On another terminal run ``` -docker run -it --rm --network ros_ursim ros2_humble:latest +docker run -it --name ROS --network ros_ursim -p50002:50002 -p8000:8000 -p7000:7000 -p5005:5005 ros2_humble:latest ``` Also note the IP address, using `hostname` ``` -hostname -i +hostname -I ``` With both containers running we can now open the URSim interface on any browser by going to this address: @@ -98,7 +98,7 @@ source /opt/ros/humble/setup.bash Next, launch the driver for communication with the UR simulation, with the IP address of the UR container ``` -ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10e robot_ip:= +ros2 launch ur_robot_driver ur10e.launch.py robot_ip:= ``` Now, from the VNC interface, we can start the external control program by clicking on the play button in the bottom right of the screen. @@ -112,7 +112,7 @@ docker ps Use the appropriate container ID to launch bash within that container. We need the container ID of the ros2_humble container. ``` -docker exec -it /bin/bash +docker exec -it ROS /bin/bash ``` Once inside, we again must source the ROS 2 environment @@ -135,32 +135,9 @@ If everything worked, this should either move the robot or complain about it bei source /opt/ros/humble/setup.bash ``` -2. **Install Required Python Libraries** - +2. **Build the Workspace** ```bash - pip install osc4py3 - ``` - - ```bash - pip install numpy==1.22.4 scipy==1.7.3 spatialmath-python==1.1.14 roboticstoolbox-python==1.1.1 osc4py3 - ``` - if an error occurs during installation run: - ```bash - python3 -m pip install --upgrade pip setuptools wheel - ``` - and try again. - - If you don't have pip installed run - - ```bash - sudo apt update - sudo apt install python3-pip - ``` - -3. **Clone and Build the Workspace** - ```bash - git clone - cd ba-alexanderschaefer/workspace + cd workspace colcon build source install/setup.bash ``` @@ -176,9 +153,9 @@ workspace/ 4. **Run the Interface** - ```bash +```bash ros2 run osc_ros2 interface - ``` +``` --- @@ -255,4 +232,4 @@ An example patch in PureData is provided (`/workspace/src/6_DOF_example.pd`) tha [^1]: [What is Docker?](https://docs.docker.com/get-started/) [^2]: [WSL2 & Docker Networking](https://stackoverflow.com/questions/65426891) -[^3]: [Cisco VPN and WSL2](https://github.com/Microsoft/WSL/issues/4277) \ No newline at end of file +[^3]: [Cisco VPN and WSL2](https://github.com/Microsoft/WSL/issues/4277) diff --git a/ROS2_humble/Dockerfile b/ROS2_humble/Dockerfile index 1d32256..dcc08ea 100644 --- a/ROS2_humble/Dockerfile +++ b/ROS2_humble/Dockerfile @@ -2,4 +2,5 @@ FROM osrf/ros:humble-desktop-full RUN apt-get -y update RUN apt-get -y upgrade -RUN apt-get -y install ros-humble-ur ros-humble-ros2controlcli nmap neovim tmux git nano iproute2 inetutils-ping +RUN apt-get -y install ros-humble-ur ros-humble-ros2controlcli nmap neovim tmux git nano iproute2 inetutils-ping python3-pip +RUN pip install numpy scipy spatialmath-python roboticstoolbox-python osc4py3 diff --git a/ur10e.urdf b/workspace/ur10e.urdf similarity index 100% rename from ur10e.urdf rename to workspace/ur10e.urdf