Skip to content

Basic Usage

GMR329 edited this page May 25, 2023 · 8 revisions

Prerequisites

  • 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.

Starting Robot

  1. Run roslaunch upmoon_base base.launch on 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.

Starting Remote Computer

  1. Connect your gamepad and run ls /dev/input/js* to determine its device name.

  2. Give the system read/write permissions to the gamepad: sudo chmod a+rw /dev/input/jsX, where X is the number of your controller.

  3. 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>.

  4. 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
  1. Make sure the controller is connected and turned on, and run roslaunch upmoon_teleop teleop_joy.launch on the remote computer.
  2. Read the comments in upmoon/upmoon_teleop/scripts/teleop_joy.py to understand control bindings.

Joystick Controls

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
Clone this wiki locally