ethz-asl / rotors_simulator

RotorS is a UAV gazebo simulator
1.2k stars 756 forks source link

new control #734

Open NadiaKhodaei opened 2 weeks ago

NadiaKhodaei commented 2 weeks ago

This Python script, key_pose.py, allows for teleoperation of a drone or robot using keyboard inputs. The script reads from the keyboard and publishes PoseStamped messages to control the position and yaw of the robot in a ROS (Robot Operating System) environment.

Setup and Usage

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/NadiaKhodaei/rotors_simulator.git
    cd rotors_simulator
  2. Ensure all dependencies are installed: Make sure you have rospy and geometry_msgs installed. You can typically install these using rosdep:

    rosdep install rospy geometry_msgs

Running the Script

  1. Navigate to the script's directory:

    cd /path/to/rotors_simulator/scripts
  2. Run the script:

    python3 key_pose.py
  3. Control your robot using the keyboard inputs as described in the key bindings section.

Example

After running the script, you should see the following prompt in your terminal: Moving around: Arrow Keys: ↑ ↓ ← →

↑/↓ : move forward/backward in x direction ←/→ : rotate left/right (yaw) in z direction i/, : move up/down in z direction k/m : move left/right in y direction anything else : stop

Adjust speed:

: increase step

: decrease step

s : reset position to default

Author

Nadia Khodaei