From 04317c5608ae5cec640e47746b2bac95b10fad7f Mon Sep 17 00:00:00 2001 From: Nicolas Hiillos Date: Wed, 11 Jan 2023 11:12:00 +0200 Subject: [PATCH] Improve package docs --- README.md | 109 ++++++++++++++++++++++++++++--- src/axidraw_controller/README.md | 12 ++-- src/draw_svg/README.md | 4 ++ src/lite6_controller/README.md | 11 ++++ src/robot_controller/README.md | 4 ++ src/robot_interfaces/README.md | 3 + 6 files changed, 127 insertions(+), 16 deletions(-) create mode 100644 src/draw_svg/README.md create mode 100644 src/lite6_controller/README.md create mode 100644 src/robot_controller/README.md create mode 100644 src/robot_interfaces/README.md diff --git a/README.md b/README.md index e13f070..3358b53 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,40 @@ # drawing-robot-ros2 +## Building ``` sh -source install/local_setup.bash -cd src/ign_moveit2_examples/src/draw_svg/ -rosdep install --from-paths . --ignore-src -r -y -colcon build -source install/local_setup.bash -ros2 launch draw_svg draw_svg.launch.py +./rebuild.sh +``` +``` sh +source src//install/local_setup.bash ``` -## xArm lite6 -- web interface: http://192.168.1.150:18333 +## Running +Run +``` sh +ros2 run robot_controller dummy_controller +``` +or +``` sh +ros2 launch axidraw_controller axidraw_controller +``` +or +``` sh +ros2 launch lite6_controller lite6_gazebo.launch.py +``` +or +``` sh +ros2 launch lite6_controller lite6_real.launch.py +``` +or +``` sh +ros2 launch lite6_controller lite6_real_no_gui.launch.py +``` -free drive mode: https://github.com/xArm-Developer/xarm_ros#6-mode-change +And simultaneously run +``` sh +ros2 run drawing_controller drawing_controller src/draw_svg/svg/test.svg +``` ## ROS2 rpi4 https://github.com/ros-realtime/ros-realtime-rpi4-image/releases @@ -33,10 +54,80 @@ apt update && apt upgrade apt install ros-dev-tools ``` +``` sh +adduser ubuntu dialout #give access to serial devices (axidraw) +``` +### Misc commands +``` sh +apt update +apt install tmux python3-colcon-ros python3-pip ros-humble-moveit +``` + +``` sh + apt install colcon + apt search colcon + apt install ros-dev-tools + vi /etc/issue + systemctl stop wpa_supplicant + wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf + wpa_cli + ip link set wlan0 up + wpa_cli + dhclient wlan0 + ping google.com + apt install ros-galactic-moveit + apt install xauth + vim /etc/ssh/sshd_config + systemctl restart sshd + colcon build --packages-select robot_interfaces robot_controller +``` + +sets priority for wlan0; uses it as gateway if connected. +/etc/netplan/50-cloud-init.yaml +``` sh +network: + wifis: + wlan0: + dhcp4: true + dhcp4-overrides: + route-metric: 100 + optional: true + access-points: + "SSID": + password: "PSK" + ethernets: + eth0: + dhcp4: true + dhcp4-overrides: + route-metric: 200 + optional: true + version: 2 +``` +/etc/ssh/sshd: +``` +X11Forwarding yes +X11UseLocalhost no +``` ### Access xarm webUI from different network If connected to the pi on 192.168.22.199, one can forward the webUI to localhost:8080 with the following: ``` sh ssh -L 8080:192.168.1.150:18333 ubuntu@192.168.22.199 ``` + +## Moveit2 docs + +``` sh + +git clone https://github.com/ros-planning/moveit2.git +cd moveit2 +git checkout humble + +sudo apt-get install doxygen graphviz + +DOXYGEN_OUTPUT_DIRECTORY=docs doxygen + +firefox docs/index.html + +``` diff --git a/src/axidraw_controller/README.md b/src/axidraw_controller/README.md index cc1e87f..585081b 100644 --- a/src/axidraw_controller/README.md +++ b/src/axidraw_controller/README.md @@ -1,10 +1,8 @@ -# Axidraw controller +# axidraw controller -## High-level python api +Implements robot_controller for the Axidraw robot. -https://axidraw.com/doc/py_api/ +`axidraw_serial.py` is used to communicate with the robot using the python API. +If more direct control is desired, this can be implemented by sending serial commands directly to the [EBB control board](http://evil-mad.github.io/EggBot/ebb.html) of the Axidraw. -## Low-level serial API - -Can be used to send commands directly to the Axidraw controller board over serial. -http://evil-mad.github.io/EggBot/ebb.html +On linux systems the board appears on `/dev/ttyACM0`. diff --git a/src/draw_svg/README.md b/src/draw_svg/README.md new file mode 100644 index 0000000..0a2d8db --- /dev/null +++ b/src/draw_svg/README.md @@ -0,0 +1,4 @@ +# draw_svg +WILL BE REMOVED + +Contains initial testing of libraries and launch files. diff --git a/src/lite6_controller/README.md b/src/lite6_controller/README.md new file mode 100644 index 0000000..3d6796d --- /dev/null +++ b/src/lite6_controller/README.md @@ -0,0 +1,11 @@ +# lite6 controller + +Implements robot_controller for the xArm lite6 robot. + +- web interface: http://192.168.1.150:18333 + +## free drive mode +This mode should allow the robot to be positioned by hand, this can be used for a homing procedure. +https://github.com/xArm-Developer/xarm_ros#6-mode-change + +I have not found a way to access the button on the robot arm in code. diff --git a/src/robot_controller/README.md b/src/robot_controller/README.md new file mode 100644 index 0000000..27b648b --- /dev/null +++ b/src/robot_controller/README.md @@ -0,0 +1,4 @@ +# Robot controller + +This package contains the `robot_controller` interface. +It also contains a `dummy_controller` that can be used for testing or reference. diff --git a/src/robot_interfaces/README.md b/src/robot_interfaces/README.md new file mode 100644 index 0000000..b17b9b8 --- /dev/null +++ b/src/robot_interfaces/README.md @@ -0,0 +1,3 @@ +# Robot interfaces for drawing robot + +Contains the custom messges, services, and actions used in the project.