From 55be0910d5a0c0a48f4872826c17cd5c36dd9736 Mon Sep 17 00:00:00 2001 From: Nicolas Hiillos Date: Fri, 28 Apr 2023 12:38:56 +0300 Subject: [PATCH] Update docs and instructions --- README.md | 14 ++++++++++++++ src/lite6_controller/src/lite6_calibration.cpp | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5bac279..1cbaf66 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ DummyController echoes Motion messages to the terminal. ros2 run robot_controller dummy_controller ``` +### AxidrawController AxidrawController draws on the axidraw robot. Find the serial device in "/dev/", it is usually named "/dev/ttyACMX" where X is usually 0. Try a different serial port if the axidraw_controller continuously logs a message about failing to connect. @@ -82,6 +83,7 @@ Try a different serial port if the axidraw_controller continuously logs a messag ros2 launch axidraw_controller axidraw_controller.launch.py serial_port:=/dev/ttyACM0 config:=./config.yaml ``` +### Lite6Controller This starts the simulated lite6 ``` sh ros2 launch lite6_controller lite6_gazebo.launch.py config:=./config.yaml @@ -97,6 +99,18 @@ This runs the real lite6 without Rviz (can be run on headless device over ssh) ros2 launch lite6_controller lite6_real_no_gui.launch.py config:=./config.yaml ``` +Before using the real lite6, it is recommended to run the calibration program. +A lite6_controller must be running for calibration. +This can be used to measure the Z height for a specific pen. +The program also moves the arm to a known default position. +``` sh +ros2 run lite6_controller lite6_calibration +``` +Follow the instructions, pressing enter when prompted. + +Change the Z-offset value accordingly. +Restart the running lite6_controller after calibration. + ### DrawingController Once a RobotController is running, simultaneously (using tmux or another terminal) run ``` sh diff --git a/src/lite6_controller/src/lite6_calibration.cpp b/src/lite6_controller/src/lite6_calibration.cpp index 1e2fa34..4ab9d54 100644 --- a/src/lite6_controller/src/lite6_calibration.cpp +++ b/src/lite6_controller/src/lite6_calibration.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) client.init(node, hw_ns); client.motion_enable(true); - println("Setting xArm lite6 to free-drive mode. Attach pen and touch the drawing surface."); + println("Setting xArm lite6 to free-drive mode. Attach pen and touch the drawing surface. (You can also skip this if you do not want to measure Z)"); client.set_mode(2); client.set_state(0); //rclcpp::sleep_for(std::chrono::seconds(20)); @@ -115,7 +115,7 @@ int main(int argc, char **argv) println("z-offset value for '" + ee_link + "' (use this value for the current pen): " + z); - println("Moving to start drawing pose"); + println("WARNING. Moving to start drawing pose. Press ctrl-c to cancel"); wait(); client.set_servo_angle(jnt_drawing_pose, 1, 1, 1, true, 100, -1); @@ -125,7 +125,7 @@ int main(int argc, char **argv) rclcpp::shutdown(); - println("Done, ignore any errors after this"); + println("Done, ignore any errors after this. Restart lite6_controller after I exit."); wait(); return 0; }