Quick Start
To teleoperate with an Xbox controller, with Perseus-Lite powered up you will need to run
Terminal 1
:::{note}
The cmd_vel_topic:=/joy_vel parameter remaps the velocity command topic for compatibility with the twist_mux topic multiplexer. This ensures the Xbox controller commands (published to /joy_vel) are correctly routed to the base controller.
:::
Terminal 2
Basic Operation
This guide covers the basic teleoperation of Perseus-Lite using keyboard control. Perseus-Lite is a simplified version of Perseus that provides essential rover functionality with streamlined hardware and software requirements.
Prerequisites
The following conditions must be met before beginning:
- The laptop runs a Linux distribution with the latest code from the perseus-v2 Github repository:
- Perseus-Lite hardware is connected via USB (typically
/dev/ttyACM0) - Perseus-Lite has sufficient battery charge or is powered by a 12V power supply
Summary
- Connect Perseus-Lite hardware
- Build the software using Nix
- Launch Perseus-Lite system
- Launch control software
- Operate Perseus-Lite safely
Hardware Connection
- Connect Perseus-Lite's USB cable to your laptop
- Verify the connection:
You should see
/dev/ttyACM0or similar device listed
Software Setup
Build the Software
Build the Perseus-Lite software using Nix:
Launch Perseus-Lite System
Launch the Perseus-Lite ROS2 system:
export LC_ALL=C && export LANG=C
nix develop --command bash -c "cd software/ros_ws && colcon build --packages-up-to perseus_lite && source install/setup.bash && ros2 launch perseus_lite perseus_lite.launch.py"
:::{note} The system will automatically configure the 4 ST3215 servos and start the communication thread. You should see messages indicating successful servo configuration. :::
Verify System Status
Open a new terminal and verify the system is running:
export LC_ALL=C && export LANG=C
nix develop --command bash -c "source software/ros_ws/install/setup.bash && ros2 topic list"
You should see topics including:
/cmd_vel- Command velocity input/joint_states- Real-time servo positions and velocities/diff_drive_base_controller/odom- Odometry data
Check joint states to verify servo feedback:
export LC_ALL=C && export LANG=C
nix develop --command bash -c "source software/ros_ws/install/setup.bash && ros2 topic echo /joint_states --once"
You should see output similar to this (values will vary based on wheel positions):
header:
stamp:
sec: 1234567890
nanosec: 123456789
frame_id: ""
name:
- front_left_wheel_joint
- front_right_wheel_joint
- rear_left_wheel_joint
- rear_right_wheel_joint
position:
- 0.0
- 0.0
- 0.0
- 0.0
velocity:
- 0.0
- 0.0
- 0.0
- 0.0
effort:
- 0.0
- 0.0
- 0.0
- 0.0
---
:::{note} When the robot is stationary, velocities should be near zero. Position values accumulate over time as the wheels rotate. Effort values represent motor load and should be low when not moving. :::
Control Software Launch
Keyboard Control
In a new terminal, launch keyboard teleoperation:
cd perseus-v2
export LC_ALL=C && export LANG=C
nix develop --command bash -c "source software/ros_ws/install/setup.bash && ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p stamped:=true -r cmd_vel:=key_vel"
:::{note}
The stamped:=true parameter publishes TwistStamped messages, and the cmd_vel:=key_vel remapping is required for compatibility with the twist_mux topic multiplexer on the main branch.
:::
Keyboard Controls
The keyboard control interface provides the following commands:
- Movement Controls:
i- Move forwardk- Stop,- Move backwardj- Turn leftl- Turn rightu- Forward + lefto- Forward + rightm- Backward + left-
.- Backward + right -
Speed Controls:
q/z- Increase/decrease linear speed by 10%w/x- Increase/decrease angular speed by 10%
:::{note}
Control messages are only sent when the terminal with keyboard teleoperation has focus and receives keystrokes. Press k to stop movement.
:::
Xbox Controller (Alternative)
If you prefer Xbox controller input:
cd perseus-v2
export LC_ALL=C && export LANG=C
nix develop --command bash -c "source software/ros_ws/install/setup.bash && ros2 launch input_devices xbox_controller.launch.py"
Safe Operation
Safety Protocol
Before operating Perseus-Lite:
- Ensure the operating area is clear of obstacles
- Keep the Perseus-Lite system within sight
- Be ready to stop operation immediately if needed
- Monitor the terminal for any error messages
Initial Testing
Test Perseus-Lite's movement systematically:
- Begin with slow speeds
- Test forward and backward motion separately from turning
- Verify movement matches expected directions
- Check that the stop command (
k) works immediately
Stopping Operation
To stop Perseus-Lite operation:
- Press
kin the keyboard control terminal to stop movement - Press
Ctrl+Cin the keyboard control terminal to exit - Press
Ctrl+Cin the Perseus-Lite system terminal to shutdown
Troubleshooting
If Perseus-Lite is not responding:
- Check that the USB connection is secure
- Verify
/dev/ttyACM0is accessible - Check the Perseus-Lite system terminal for error messages
- Restart the Perseus-Lite system if necessary
Common issues:
- No servo response: Check USB connection and power
- Permission denied on /dev/ttyACM0: Add user to dialout group or use sudo
- Locale warnings: Use
export LC_ALL=C && export LANG=Cbefore commands
System Shutdown
To properly shutdown Perseus-Lite:
- Stop all movement commands
- Press
Ctrl+Cin the keyboard control terminal - Press
Ctrl+Cin the Perseus-Lite system terminal - Disconnect the USB cable
- Power down Perseus-Lite hardware