diff --git a/RWR/src/assets/10_left_link3_config_step_1.png b/RWR/src/assets/10_left_link3_config_step_1.png deleted file mode 100755 index a5a827e6f523d76522eec7d0c63653223f80fd70..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/10_left_link3_config_step_1.png and /dev/null differ diff --git a/RWR/src/assets/11_left_link3_config_step_2.png b/RWR/src/assets/11_left_link3_config_step_2.png deleted file mode 100755 index c6b504c9ff6f7938809f6763e3943b8dff11eff0..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/11_left_link3_config_step_2.png and /dev/null differ diff --git a/RWR/src/assets/12_robot_back_overview.png b/RWR/src/assets/12_robot_back_overview.png deleted file mode 100755 index 6ca0d007c83870b6d912162877292b66df8fd6cd..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/12_robot_back_overview.png and /dev/null differ diff --git a/RWR/src/assets/13_robot_back_angle_directions.png b/RWR/src/assets/13_robot_back_angle_directions.png deleted file mode 100755 index 4654649ccbd79b234570f144a7084a04e2418f91..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/13_robot_back_angle_directions.png and /dev/null differ diff --git a/RWR/src/assets/14_right_link1_config_step_1.png b/RWR/src/assets/14_right_link1_config_step_1.png deleted file mode 100755 index 0094a13641b1da2603e7fd571558f71e99076416..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/14_right_link1_config_step_1.png and /dev/null differ diff --git a/RWR/src/assets/15_right_link1_config_step_2.png b/RWR/src/assets/15_right_link1_config_step_2.png deleted file mode 100755 index 8f41d4e96012b4c37c89287238d16919fe81d1d9..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/15_right_link1_config_step_2.png and /dev/null differ diff --git a/RWR/src/assets/16_left_link1_config_step_1.png b/RWR/src/assets/16_left_link1_config_step_1.png deleted file mode 100755 index 566b549dc4ce1b3f473a7adaddda0ec75996e802..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/16_left_link1_config_step_1.png and /dev/null differ diff --git a/RWR/src/assets/17_left_link1_config_step_2.png b/RWR/src/assets/17_left_link1_config_step_2.png deleted file mode 100755 index d575b466f2baad37d262a8e4a261628407c366f3..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/17_left_link1_config_step_2.png and /dev/null differ diff --git a/RWR/src/assets/1_robot_right_links.png b/RWR/src/assets/1_robot_right_links.png deleted file mode 100755 index 8f2bf335388b41012f754918df025f0c89c8aad9..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/1_robot_right_links.png and /dev/null differ diff --git a/RWR/src/assets/2_right_straight_links.png b/RWR/src/assets/2_right_straight_links.png deleted file mode 100755 index b9c745da6b31d04228c6f20af007662d074579ab..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/2_right_straight_links.png and /dev/null differ diff --git a/RWR/src/assets/3_right_link_angles_example.png b/RWR/src/assets/3_right_link_angles_example.png deleted file mode 100755 index 57c323c86660ce0839482f3b8fc1207591c6d7e4..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/3_right_link_angles_example.png and /dev/null differ diff --git a/RWR/src/assets/4_right_link2_config_step_1.png b/RWR/src/assets/4_right_link2_config_step_1.png deleted file mode 100755 index 6a700d56a327b9731fc1bac7fd3cc79799b10200..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/4_right_link2_config_step_1.png and /dev/null differ diff --git a/RWR/src/assets/4_right_link2_config_step_2.png b/RWR/src/assets/4_right_link2_config_step_2.png deleted file mode 100755 index b47ab12abe9f35f801a2cc9eae3ad3171911efc7..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/4_right_link2_config_step_2.png and /dev/null differ diff --git a/RWR/src/assets/5_right_link3_config_step_1.png b/RWR/src/assets/5_right_link3_config_step_1.png deleted file mode 100755 index ce1e72e3ff52841dd889721fa3c22153c543ed52..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/5_right_link3_config_step_1.png and /dev/null differ diff --git a/RWR/src/assets/6_right_link3_config_step_2.png b/RWR/src/assets/6_right_link3_config_step_2.png deleted file mode 100755 index 780bba41e09ba84a70b8db7fb9537b68bdbb4e5e..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/6_right_link3_config_step_2.png and /dev/null differ diff --git a/RWR/src/assets/7_robot_left_overview.png b/RWR/src/assets/7_robot_left_overview.png deleted file mode 100755 index 8f01dd6ff31213d9061362068d90097d8b9cfb61..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/7_robot_left_overview.png and /dev/null differ diff --git a/RWR/src/assets/8_left_link2_config_step_1.png b/RWR/src/assets/8_left_link2_config_step_1.png deleted file mode 100755 index a5ddc7126f6f88c86bf2f9f33588e8ba938694b3..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/8_left_link2_config_step_1.png and /dev/null differ diff --git a/RWR/src/assets/9_left_link2_config_step_2.png b/RWR/src/assets/9_left_link2_config_step_2.png deleted file mode 100755 index df3e760014c07d9662e7ff817d0764e27af4bccd..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/9_left_link2_config_step_2.png and /dev/null differ diff --git a/RWR/src/assets/custom_shoulder_assembly.jpg b/RWR/src/assets/custom_shoulder_assembly.jpg deleted file mode 100644 index 77b8e91982a50282effb24fe6faa81d587071305..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/custom_shoulder_assembly.jpg and /dev/null differ diff --git a/RWR/src/assets/kinematic_coord_system.jpg b/RWR/src/assets/kinematic_coord_system.jpg deleted file mode 100644 index ef34d68591983c70242357b6556518ffa22df139..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/kinematic_coord_system.jpg and /dev/null differ diff --git a/RWR/src/assets/lidar_mount.jpg b/RWR/src/assets/lidar_mount.jpg deleted file mode 100644 index d22e0173e8398e588b4a2f1e1ba2e5ae23505c32..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/lidar_mount.jpg and /dev/null differ diff --git a/RWR/src/assets/robot_bottom.jpg b/RWR/src/assets/robot_bottom.jpg deleted file mode 100644 index e3ccbeaa0bfc155cbb6d482a5ac439b4edfac21a..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/robot_bottom.jpg and /dev/null differ diff --git a/RWR/src/assets/robot_top.jpg b/RWR/src/assets/robot_top.jpg deleted file mode 100644 index 2a3f23ac0a791f91411d632a5fa95079fe8a31bc..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/robot_top.jpg and /dev/null differ diff --git a/RWR/src/assets/robot_top_no_servos.jpg b/RWR/src/assets/robot_top_no_servos.jpg deleted file mode 100644 index 6e2a65460690e085a3aae06b2d9f369bdabe091e..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/robot_top_no_servos.jpg and /dev/null differ diff --git a/RWR/src/assets/rpi_platform.jpg b/RWR/src/assets/rpi_platform.jpg deleted file mode 100644 index b9df2396e3aaf356ed369dd2b1c7d0a72ecad768..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/rpi_platform.jpg and /dev/null differ diff --git a/RWR/src/assets/rviz_animation.gif b/RWR/src/assets/rviz_animation.gif deleted file mode 100644 index de2af20f5834453c36c49443de0feddab82c2d48..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/rviz_animation.gif and /dev/null differ diff --git a/RWR/src/assets/servo_calibration_spreadsheet.png b/RWR/src/assets/servo_calibration_spreadsheet.png deleted file mode 100644 index e2c2aadb12300b6971e5561e0b69c7e51d458cea..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/servo_calibration_spreadsheet.png and /dev/null differ diff --git a/RWR/src/assets/servo_move_prompt.png b/RWR/src/assets/servo_move_prompt.png deleted file mode 100755 index 8f88e439becccbfec23b38615e483df6da44b186..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/servo_move_prompt.png and /dev/null differ diff --git a/RWR/src/assets/spot_micro_slam.gif b/RWR/src/assets/spot_micro_slam.gif deleted file mode 100644 index bb234030637c2f67616a29b7c480c8c7aa19f810..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/spot_micro_slam.gif and /dev/null differ diff --git a/RWR/src/assets/spot_micro_walking.gif b/RWR/src/assets/spot_micro_walking.gif deleted file mode 100644 index 9d33e591bd7d8b75abedb5e0efd3463345b10d5d..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/spot_micro_walking.gif and /dev/null differ diff --git a/RWR/src/assets/state_machine.png b/RWR/src/assets/state_machine.png deleted file mode 100644 index aedbd0f50a70d7b5939b3578235531be5040aa0b..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/state_machine.png and /dev/null differ diff --git a/RWR/src/assets/tf2_coord_system.jpg b/RWR/src/assets/tf2_coord_system.jpg deleted file mode 100644 index f1d9ff51f64de9a2a69ecbd76b5f802bb381ebc4..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/tf2_coord_system.jpg and /dev/null differ diff --git a/RWR/src/assets/walking_and_slam.gif b/RWR/src/assets/walking_and_slam.gif deleted file mode 100644 index 999d2939bd587cd916a7c7584fe305724c9d70e5..0000000000000000000000000000000000000000 Binary files a/RWR/src/assets/walking_and_slam.gif and /dev/null differ diff --git a/RWR/src/assimp_catkin b/RWR/src/assimp_catkin deleted file mode 160000 index 45cfea6f558f9f06c00fb50e557c165606bc5aa0..0000000000000000000000000000000000000000 --- a/RWR/src/assimp_catkin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 45cfea6f558f9f06c00fb50e557c165606bc5aa0 diff --git a/RWR/src/docs/additional_hardware_description.md b/RWR/src/docs/additional_hardware_description.md deleted file mode 100644 index e67ec7f12ad31079fb6d08a905d9084f5507cbc6..0000000000000000000000000000000000000000 --- a/RWR/src/docs/additional_hardware_description.md +++ /dev/null @@ -1,51 +0,0 @@ -# Additional Hardware Description -This document provides some addition description of the harware for the spot micro robot. - -* [Custom 3d Printed Parts](#custom-3d-printed-parts) -* [Coordinate Frames](#coordinate-frames) -* [Sample Hardware Install Photos](#sample-hardware-installation-photos) - - -## Custom 3d Printed Parts - -Several custom 3d printed pieces were created to expand on KDY's original design. These include a custom shoulder assembly to provide additional reinforcement, and several mounting platforms for convenience. - -The modified shoulder assembly, shown below, includes an additional plastic piece to provide additional reinforcement to the shoulder axis. It requires printing an antire set of shoulder joint parts, which can be found [at this thingverse page](https://www.thingiverse.com/thing:4591999). Two sets must be printed mirrored for the opposite side's legs. The modified shoulder will require an additional 8x M3x10 screws, 8x M3 nuts, and 4x F625zz bearings in total for assembly. - - - - -A plain center body platform, and two convenience platforms for mounting the RPI 3 and PCA9685 boards can be found [at this thingverse page](https://www.thingiverse.com/thing:4596267). The Raspberry Pi platform is shown below. It can be adhered to the center platform by double sided foam tape. Small wood screws can be used are used t attach the RPi3 and PCA9685 to these platforms. - - - -A custom platform and mount adapter for a RPLidar A1 can be found at [at this thingverse page](https://www.thingiverse.com/thing:4713180). Design courtesy of Maggie Mathiue. Like the platforms above, the base can be adhered to the center body platform by double sided foam tape. The mount adapter is attached to a RPLiadr A1 by 4x M2.5x8 screws and to the bottom platform by small wood screws. - - - - - -## Coordinate Frames -There are many coordinate frames on the spot micro frame (one at each joint!), but some of the more important frames are described here. - - -#### Kinematics Coordinate Frame -With regard to kinematics of the robot frame, the coordinate frame is oriented as follows: X positive forward, Y positive up, Z positive left. This frame was is only relevant if working on the kinematic calculations for the robot. It is the same coordinate frame as used in the paper sourced for the inverse kinematic calculations for this project ("Inverse Kinematic Analysis Of A Quadruped Robot"). - - - -#### TF2 Coordinate Frame -The TF2 coordinate frames is the base robot body coordinate frame used for all transforms published to TF2 within the ROS framework. This is the robot coordinate frame of interest with regard to mapping and navigation. This frame is oriented as follows: X positive forward, Y positive left, Z positive up. - - - - -## Sample Hardware Install Photos -The following photos a sample installation of components on the spot micro frame. - - - - - - - \ No newline at end of file diff --git a/RWR/src/docs/joystick_control.md b/RWR/src/docs/joystick_control.md deleted file mode 100644 index 7697a6247e28a9934e0e90e10ee20f4635ed036d..0000000000000000000000000000000000000000 --- a/RWR/src/docs/joystick_control.md +++ /dev/null @@ -1,44 +0,0 @@ -# Joystick control -With the spot_micro_joy node it is possible to control the robot by a joystick. The default configuration is set up for -an PS4 controller which kan be connected by bluetooth directly. If you want to use another controler you need at -least 4 axes and 4 buttons. - -To test if you joystick is working you can use the jstest command line this: -``` -ubuntu@spotmicro:~$ jstest /dev/input/js0 -Driver version is 2.1.0. -Joystick (Wireless Controller) has 8 axes (X, Y, Rx, Ry, Z, Rz, Hat0X, Hat0Y) -and 13 buttons (BtnX, BtnY, BtnTL, BtnTR, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR, ?, ?, ?). -Testing ... (interrupt to exit) -Axes: 0: 0 1: 0 2: 0 3: 0 4:-32767 5:-32767 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off ^C -``` - -To check if your controller is woking with ROS, mapped and calibrated correctly you might try to start the joy ROS Node by hand. -If you need to calibrate your joystick, i recommend jstest-gtk. To persist you configuration run jscal-store. - -``` -ubuntu@spotmicro:~$ rosrun joy joy_node -[ INFO] [1615052346.145750548]: Opened joystick: /dev/input/js0. deadzone_: 0.050000. -``` -In another teminal take a look into the messages your joy_node emits -``` -ubuntu@spotmicro:~$ rostopic echo joy -header: - seq: 1 - stamp: - secs: 1615052430 - nsecs: 954517162 - frame_id: '' -axes: [0.0, -0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] -buttons: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ---- -``` -All axes should send values between -1 and 1. Buttons are 1 or 0. - -Now you can check (and modify if needed) the mappings in ```spotMicroJoystickMove.py``` - -Once done, bring your robot in a save position and start ```roslaunch spot_micro_joy everything.launch``` which will -start everything needed to operate the robot by joystick. - -It is a good idea to start with a low value for transit_angle_rl. Once everything is working fine you might increase it -to get a more agile and responsive doggy :) \ No newline at end of file diff --git a/RWR/src/docs/servo_calibration.md b/RWR/src/docs/servo_calibration.md deleted file mode 100644 index 20e32921cb4db8c448def9aa093800e196bf029e..0000000000000000000000000000000000000000 --- a/RWR/src/docs/servo_calibration.md +++ /dev/null @@ -1,141 +0,0 @@ -# Servo Calibration Guide - -This document provides a comprehensive guide to install and calibrate servos on a spot micro frame, and create a cooresponding servo configuration the ROS motion command node requires. A spreadhseet named `servo_calibration_spreadsheet.ods` is included in this repo in the `docs` directory as an aid for calculating the servo configuration values. - - -The servo configuration dictionary is contained within the configuration file `spot_micro_motion_cmd.yaml` and holds servo configuration values as shown below: -```yaml -num_servos: 12 -servo_max_angle_deg: 82.5 -RF_3: {num: 1, center: 306, range: 385, direction: 1, center_angle_deg: 84.0} -RF_2: {num: 2, center: 306, range: 385, direction: 1, center_angle_deg: -27.9} -RF_1: {num: 3, center: 306, range: 396, direction: -1, center_angle_deg: -5.4} -RB_3: {num: 4, center: 306, range: 394, direction: 1, center_angle_deg: 90.4} -. -. -. -``` - -Servo's are defined by a abbreviation and number referring to their location and position within a leg. "RF" cooresponds to right front, "RB" to right back, similarly "LF" and "LB" to the left front and left back legs. A number 1 cooresponds to link 1 (the hip joint), 2 to link 2 (the upper leg, or shoulder joint), and 3 to link 3 (the lower leg or knee joint). - -### Description of Servo Configuration Values -* **num_servos**: Fixed at 12 for this spot micro platform - -* **servo_max_angle_deg**: Maximum permissible command angle in a single direction for every servo. Robotic servos usually have a total movement range of 180 deg (i.e. +/- 90 deg in each direction from center). The maximum value for this limit is usually 90 deg, however it is useful to slightly constrain it to account for errors in servo center position, potential performance loss near the edges of a servo's travel, or to avoid mechanical limits or restrictions. A value of 82.5 deg works for my robot. - -* **num:** Port on the PCA9685 board (numbered 1-16) which that servo is connected to - -* **center:** The "raw" pwm value the PCA9685 node recieves representing the servo center position. A servo's position is generally commanded by a 1 to 2 ms pulse in a 50 hz cycle (20 ms time period). The PCA9685 board and cooresponding ros node controls the length of this pulse via a 12 bit pwm value. Assuming a 20ms total cycle length, 0 means no pulse, 2^12=4096 means a constant high signal, and 2048 for example would mean a pulse length of 10ms. A servo's center position is usually positioned with a 1.5 ms pulse which cooresponds to a pwm value of about 307. This value can be fine tuned by moving a sample servo with a horn on it via the servo keyboard move node and finding the center point from where the servo moves equally in opposite directions (say +/- 90 deg equally from the center. The value of 307 is a good starting point, and the value should be the same for all the servos in a set of the same kind. - -* **range:** The "raw" pwm value that cooresponds to the max end to end movement range for a servo. This will be related to the servo_max_angle_deg defined in the config file. As an example, the servo range value would be the raw pwm value for a servo position at +80 deg minus the raw pwm value for a servo position at -80 deg . The spreadsheet in this repo calculates this range value. - -* **direction:** A value of 1 or -1. Reverses the direction or servo rotation if needed, dependent on the coordinate axes of a specific leg joint. Computed in the servo calibration spreadsheet. - -* **center_angle_deg:** The value in degrees, in a leg joint's specific coordinate system, that cooresponds to a servo's position when at it's "center" pwm value. Value calculated in the servo calibration spreadsheet. - - -### Servo Installation -Servos must be connected in the following order to the PCA 9685 control board: -1. Right front knee -2. Right front shoulder -3. Right front hip -4. Right back knee -5. Right back shoulder -6. Right back hip -7. Left back knee -8. Left back shoulder -9. Left back hip -10. Left front knee -11. Left front shoulder -12. left front hip - -It is reccomended to install servos in the spot micro frame when they are powered and commanded to their center position. The joint which a servo is installed in should be approximately positioned at it's "nuetral" stance, the position about which most leg motion will occur. This ensures maximum servo travel will be available around the typical joint command angles. The two figures below roughly depict the joint orientations for which servo's should be installed when at their center position. - - - - - -### Commanding Individual Servos for Calibration -Individual servo's can be commanded via the servo_move_keyboard ROS node for the calibration procedure. After one or more servos are connected to the PCA9685, the steps for commanding a single servo are as follows: - -1. On the raspberry pi, start the i2cpwm_board node: -`rosrun i2cpwm_board i2cpwm_board` -2. On another terminal on the raspberry pi, or on a linux machine with ROS installed and capabile of communicating with the raspberry pi, run the servo_move_keyboard ros node: -`rosrun servo_move_keyboard servoMoveKeyboard.py` -3. After the descriptive prompt appears, type `oneServo` to enter the one servo command node. -4. Select the servo to command by entering the integer number cooresponding to the PCA9685 port to command, for example, `2`. After a servo is selected, all other servos are commanded to idle (or freewheel) such that they can be moved by hand. The following prompt will appear: - - - -5. Use the key `y` to command the default center value of the selected servo (pwm = 306). Use the keys `g` and `j` to decrease or increase the servo pwm command value by 1, respectively. This moves the servo in fine increments. The current pwm value is printed in the terminal. Use the `f` and `k` keys to move the servo in coarser increments. - * Key's `z` and `x` can be used to quickly command the servo to it's min and max values, respectively (by default 83 and 520, but these can be updated per servo by the keys specified in the instrucitonal prompt). Be careful commanding min/max, and ensure your servos can physically move to those positions and won't get stuck. -6. After commanding a servo to desired calibration positions and noting down values in the calibration spreadsheet, exit the one servo control mode by pressing `q` -7. Go back to step 3 to repeat the process for another servo. - -### Guide to Creating Servo Calibration Values -Adequate kinematic performance can be achieved through calibration of links by eye, as depicted in the diagrams below. However, I also used a smartphone inclinometer app as an aid to measure angles of 45 deg for the link 1 calibration. It is reccomended to prop up the robot on a box or similar test stand so the legs can hang freely for calibration. - -**Leg links should be visualized as straight lines segments from reference point to reference point (e.g. axis of rotation to axis of rotation).** When positioning joints for calibration, use the wireframe representation of each link for orientation reference rather than the 3d printed part itself. - -The servo calibration can be built up with aid of the servo_calibration_spreadsheet, shown in the figure below. Generally the procedure is the position each link to two reference positions (angles) and note down the corresponding pwm values for those positions. I used gross angles of 0 and 90 deg for ease of placement by eye. While the slope value is not used, it is useful to keep an eye on it as all servos should have similar calculated slopes. Large discrepancies in this value could be indicative of errors. -If you get unexpected values for servo 3 and 12 you might check if you printed a modified model with inverted hip-servos. To check this take a look from inside the body. If you see 4 ball-bearings you have the original design, if you see 2 ball-bearings and 2 server-horns the servos 3 and 12 will be inverted. - - - -#### Right Side Legs Links 2 and 3 Calibration - -**Consistency in the following steps is more important than accuracy.** - -Start with calibrating links 2 and 3 for all legs, starting with the right side of the robot. The figure below depicts the coordinate systems of the links of the right side legs positioned at 0 degrees, and defines the positive and negative angle directions. - - - -Note that link 3's angles are relative to link 2, as exemplified by the figure below: - - -Starting with link 2 (ignoring the orientation of link 3), command link 2 to positions of 0 and -90 degrees, and note the cooresponding PWM values in the spreadsheet. These two positions are shown in the following two figures. - - - - -Next, move onto link 3. For ease of visualizing reference orientation, manually position link 2 in a vertical orientation. Command link 3 to 0 and +90 degree positions and record the cooresponding pwm values. The two positions of link 3 are shown in the following two figures. - - - - -Repeat this process for the other right side leg. - -#### Left Side Legs Links 2 and 3 Calibration -Next repeat this process for the legs on the left side of the robot. **Note that** the coordinate systems for the left legs have different directions for positive and negative angles. These are depicted in the figure below for completeness. - - - -Repeat the calibration process for link 2 on the left side legs. Position link 2 to 0 and +90 degree positions, and record the PWM values in the spreadsheet. The two positions are shown in the following two figures. - - - - -Repeat the calibration process for link 3 on the left side legs. Manually position link 2 vertically, then position link 3 at 0 and -90 degrees and record the cooresponding pwm values in the spreadsheet. The two positions are shown below. - - - - -Repeat the process for both left side legs. - -#### Left and Right Legs Link 1 Calibration - -Finally, calibrate link 1 for the left and right legs in a similar pattern. The coordinate systems for link 1 of the left and right legs is shown in the figures below. - - - - -Start with the right legs, and command link 1 to 0 and -45 degrees, and record the cooresponding PWM values in the spreadsheet. A reference value of 45 degrees is used instead of 90 due to mechanical limits. Repeat the process for the left legs. These positions are shown in the four figures below. - - - - - - - - -This complets the leg servo calibration process. Take the **bold** values from the servo calibration spreadsheet and copy them to the servo configuration dictionaries in the `spot_micro_motion_cmd.yaml` config file. This file is located in your catkin worksapce in the following subfolders ```src/spot_micro_motion_cmd/config/spot_micro_motion_cmd.yaml```. diff --git a/RWR/src/docs/servo_calibration_spreadsheet.ods b/RWR/src/docs/servo_calibration_spreadsheet.ods deleted file mode 100644 index 2ef7eeade88d4463990647ce51d2c70df08b0e77..0000000000000000000000000000000000000000 Binary files a/RWR/src/docs/servo_calibration_spreadsheet.ods and /dev/null differ diff --git a/RWR/src/docs/slam_information.md b/RWR/src/docs/slam_information.md deleted file mode 100644 index 71707117ae9280961174cb0d4457f73ea033774b..0000000000000000000000000000000000000000 --- a/RWR/src/docs/slam_information.md +++ /dev/null @@ -1,77 +0,0 @@ -# SLAM Information -This document provides additional information for running SLAM on a spot micro quadruped through this project. - -* [Required Setup](#required-setup) -* [Generating a Map](#generating-a-map-frames) -* [Saving a Map](#saving-a-map) -* [Recording a Data Log](#recording-a-data-log) -* [Reprocessing Scan Data Through Log Playback](#reprocessing-scan-data-through-log-playback) - - -Example of robot walking and mapping an environment. - -## Required Setup -Two prerequisite steps are required for SLAM: -1. Installing additional ROS packages -2. Elevating permissions of the USB port the lidar is connected to for it's ROS package - -Two additional ROS packages must be installed, and these must be installed on the Raspberry Pi. It is also reccomended to install these on a Linux host machine for use such as data reprocessing. The required packages are hector_slam and rplidar_ros, which can be installed with the following commands: -``` -sudo apt-get install ros-kinetic-rplidar-ros -sudo apt-get install ros-kinetic-hector-slam -``` -See the following [website](http://wiki.ros.org/kinetic/Installation/Ubuntu) for additional information about setting up your sources list if the above commands do not work. - -Elevated permissions will need to be granted to the USB port the RPLidar is connected to. After connecting the RPLidar to one of the RPi's usb ports, find which USB port it is connected to using the following command: -`ls -l /dev |grep ttyUSB` -Elevate that ports authorit with the following command. Example if the port was `USB0`: -`sudo chmod 666 /dev/ttyUSB0` - -This step may or may not need to be done everytime the RPi is power cycled. It seems to be applied permanent at least when using the Ubiquity Robotics RPi Ubuntu images with ROS. See [the following page](https://github.com/robopeak/rplidar_ros/wiki) for more details about setting uo the RPLidar A1 for use with the rplidar_ros package. - -Note that the RPLidar A1 will start rotating once it is plugged into a powered USB port through it's USB to serial board. It is possible to command the lidar to stop so it does not rotate when not in use via it's SDK, but this functionalty is not yet implemented on this project. - -This project assumes a RPLidar A1. If another Lidar is used, then a different lidar driver ROS package will be needed. - - -## Generating a Map -It is reccomended to use the trot gait for robot motion when mapping with a lidar, as it is slightly smoother, albeit less stable, than the 8 phase gait. - -Open at least two terminal windows, with one ssh'ed to the raspberry pi. I reccomend using a terminal multiplexer such as `tmux` for convenience. Start the following launch files in the respective terminals: -* `roslaunch spot_micro_launch motion_control_and_hector_slam.launch`: Run on the Raspberry Pi. Launches the i2c_pwmboard node, the robot's motion control node, hector_mapping, and the lidar driver node (rplidar_ros). -* `roslaunch spot_micro_launch keyboard_control_and_rviz rviz_slam:=true` Run on a local machine. Launches the keyboard command node for issuing keyboard commands to the spot micro robot in the terminal, as well as rviz with a configuration to display the mapping process. - -After everything is launched, the robot can be manually directed to walk around an environment (such as a room or apartment) through the keyboard command node, and a map will be geerated and shown in real time through RVIZ, along with the robot's current and past positions. - -## Saving a Map -To save a map, such as to use it in the future for navigational purposes, run the robot until a satisfactory map is shown in RVIZ. Keep all nodes running, open another terminal in a ros environment on either the RPi or local linux host, and run the following command: -`rosrun map_server map_saver -f my_map_filename` -This will generate two files (my_map_filename.pgm and my_map_filename.yaml) in the same directory in which the command was run. A custom name can be provided in place of `my_map_filename`. See the [following website](http://wiki.ros.org/map_server) for more detals about ros map_server. - -Another type of map can be generated which is purely an image and is not useful for navigational purposes. This map can be generated by running the following command in a ros environment: -`rostopic pub syscommand std_msgs/String "savegeotiff"` - - -## Recording a Data Log -Recording a data log is useful for playing back and inspecting or analyzing data at a later point, as well as for reprocessing data which is described in the next section. - -The record a data log, make a new directory for storing logfiles: -``` -mkdir ~/bagfiles -cd ~/bagfiles -``` -And record all rostopics with the following command: -`rosbag record -a` - -Note that log files will be on the order of 1 GB in size per around 10 minutes of operation. - -## Reprocessing Scan Data Through Log Playback -A data log can be played back to reprocess data. One use case for this is to playback a log file with lidar scan data and regenerate a map again, and being able to use differnet mapping settings or an entirely different mapping package. - -As an example, the steps to playback a recorded dataset through hector slam are: -1. Playback a log using a command such as `rosbag play <your bagfile>`. Additional command line arguments, such as `--topics <topic1_to_play> <topic2_to_play> ...` can be added to specify which topics to playback only. -2. Start the hector slam node and rviz to visualize the mapping process. This can be done through the following two launch commands: -`roslaunch spot_micro_rviz slam.launch` -`roslaunch spot_micro_launch motion_control_and_hector_slam.launch run_post_proc:=true` - - diff --git a/RWR/src/maps/ex2_map.yaml b/RWR/src/maps/ex2_map.yaml deleted file mode 100644 index db29864b2faec86f262296890564efdc2a58dac3..0000000000000000000000000000000000000000 --- a/RWR/src/maps/ex2_map.yaml +++ /dev/null @@ -1,7 +0,0 @@ -image: ex2_map.pgm -resolution: 0.050000 -origin: [-10.000000, -10.000000, 0.000000] -negate: 0 -occupied_thresh: 0.65 -free_thresh: 0.196 - diff --git a/RWR/src/read_event_pub/src/event_array_sub.cpp b/RWR/src/read_event_pub/src/event_array_sub.cpp index 94b4b36f86697272786a38404e782c8804e868d1..c4e7f6e7d932906ea298125bf6c8c8d7614c5540 100644 --- a/RWR/src/read_event_pub/src/event_array_sub.cpp +++ b/RWR/src/read_event_pub/src/event_array_sub.cpp @@ -163,17 +163,4 @@ void EventArraySub::publishEventStats() ros::Duration(1.0).sleep(); } -} //namespace -/* -int main(int argc, char** argv) -{ - ros::init(argc, argv, "read_event_pub_node"); - - ros::NodeHandle nh; - event_array_sub::EventArraySub eventArraySub(nh); - //EventArraySub eventArraySub(nh); - ros::spin(); - - return 0; -} -*/ \ No newline at end of file +} //namespace \ No newline at end of file diff --git a/RWR/src/read_event_pub/src/optical_flow.cpp b/RWR/src/read_event_pub/src/optical_flow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..570d903f7324d3a9f9be4d43c5c2ecce6faeed95 --- /dev/null +++ b/RWR/src/read_event_pub/src/optical_flow.cpp @@ -0,0 +1,5 @@ +#include <ros/ros.h> +#include <dvs_msgs/Event.h> +#include <dvs_msgs/EventArray.h> +#include <dvs_msgs/stats.h> + diff --git a/RWR/src/setupeventsim.sh b/RWR/src/setupeventsim.sh deleted file mode 100755 index 77a95f14fe90c9bd4a8400b0ae1327953e070a34..0000000000000000000000000000000000000000 --- a/RWR/src/setupeventsim.sh +++ /dev/null @@ -1 +0,0 @@ -source ~/3rdYear/RWR/Robot-With-Reflexes/sim_ws/devel/setup.bash \ No newline at end of file diff --git a/RWR/src/source.sh b/RWR/src/source.sh deleted file mode 100755 index d0427a83220a8df3becdb4cf9837f777c18f8e31..0000000000000000000000000000000000000000 --- a/RWR/src/source.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -source ../devel/setup.bash \ No newline at end of file