-
Notifications
You must be signed in to change notification settings - Fork 0
Basic Usage
- ROS Noetic on Ubuntu 20.04
- System packages:
- ros-noetic-ros-control
- ros-noetic-ros-controllers
- ros-noetic-robot-state-publisher
- ros-noetic-joint-state-controller
- ros-noetic-controller-manager
- ros-noetic-move-base
- ros-noetic-realsense2-camera
- ros-noetic-rtabmap-ros
- ros-noetic-joy
- ros-noetic-urdfdom-py
- Python packages (for robot only):
- RPi.GPIO
- pysabertooth
- PyTrinamic
- Understand how to use ROS and launch ROS nodes/launch files.
- Run
roslaunch upmoon_base base.launchon the RPi. This will launch four ROS nodes: upmoon_base's upmoon_node, upmoon_gpio's motor_drivers, controller_maanger, and robot_state_publisher. These nodes will will respond to control messages to move the robot's motors.
-
Connect your gamepad and run
ls /dev/input/js*to determine its device name. -
Give the system read/write permissions to the gamepad:
sudo chmod a+rw /dev/input/jsX, where X is the number of your controller. -
Define the gamepad's device as the rosparam in
upmoon/upmoon_teleop/launch/teleop_joy.launch. Modify the following line that appears next to your device number:<rosparam param="joy_node/dev">/dev/input/jsX</rosparam>. -
Verify that you can resolve the robot by it's hostname:
ping upmoon-rpi. If this fails, manually set the IP of the hostname in /etc/hosts. See http://wiki.ros.org/ROS/NetworkSetup for details. Example:
127.0.0.1 localhost
127.0.1.1 me10
10.42.0.235 upmoon-rpi # <<< Newly added line of the robot's IP
- Make sure the controller is connected and turned on, and run
roslaunch upmoon_teleop teleop_joy.launchon the remote computer. - Read the comments in
upmoon/upmoon_teleop/scripts/teleop_joy.pyto understand control bindings.
| Input | Action |
|---|---|
| X | Soft Stop |
| Triangle | Deposition Open/Close |
| Square | Deposition Raise/Lower |
| Left Trigger | Drive Backward |
| Right Trigger | Drive Forward |
| Left Stick X-Axis | Turn Left/Right |
| Left D-Pad | Pack Out |
| Right D-Pad | Pack In |
| Down D-Pad | Turning State |
| Left Bumper | Digger Stop |
| Right Bumper | Digger Increment Forward 5% |
| Right Stick Y-Axis | Digger Raise/Lower |
| Start | Toggle Enter/Exit Secondary Controls |
| Square (Start) | Pack Dump System In/Out |
| Left Bumper (Start) | Select Front Left Wheel for Articulation |
| Left Trigger (Start) | Select Back Left Wheel for Articulation |
| Right Bumper (Start) | Select Front Right Wheel for Articulation |
| Right Trigger (Start) | Select Back Right Wheel for Articulation |
| Right D-Pad (Start) | Move Ankle 0.1 Radians |
| Up D-Pad (Start) | Move Ankle 0.5 Radians |
| Left D-Pad (Start) | Move Ankle -0.1 Radians |
| Down D-Pad (Start) | Move Ankle -0.5 Radians |
Currently the most updated code is on dumping_actions. Make sure to push the code from the RPi on the rover. Computer 10 has most updated Teleop code, but this has also been pushed.
Recommended to make new repository for next years competition.
Middle right motor is bad (the wrong firmware has been installed and control circuit does not work for motor).
One motor has soldered connections between circuit board and motor. This should be fixed or replaced, this is temporary solution.
One control wire for a motor is hot glued into the white connected (for the Trinamic motor). This needs to be fixed and wired in correctly.
WARNING: When you first turn on the robot, hitting an acceleration button will move the rover in the other direction. Quickly hit the other acceleration button (trigger buttons) to stop this and make the rover move normally
Using ROS software to align wheels when needed.
Most useful files are the Teleop script file (code responsible for controlling rover) and the upmoon_gpio file that contains all the information for motor initialization and other code.
Recommendations: For automation, try not to do full automation but rather have routines programmed in. For example, you drive the rover but have a routine for if the rover should go forward and start digging. Basically, full automation is a pain, make routines for more simple parts and build up from there.
Recommendation: Try updating motors and circuit boards as the parts are getting old and it is getting difficult to buy replacements.
TIP: Turning on and off the rover can help reset motors and help the digging system.
IMPORTANT: If you have a broken motor that is causing you pain. Maybe try customer support. The Trinamic motor costumer support takes a day and they will give you a detailed solution or let you know that fixing a motor is impossible. DON'T BE AFRAID TO ASK FOR HELP!