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
ROS (Robot Operating System) installed on your system.
Python 3.x installed on your system.
Installation
Clone the repository:
git clone https://github.com/NadiaKhodaei/rotors_simulator.git
cd rotors_simulator
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
Navigate to the script's directory:
cd /path/to/rotors_simulator/scripts
Run the script:
python3 key_pose.py
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
This Python script,
key_pose.py
, allows for teleoperation of a drone or robot using keyboard inputs. The script reads from the keyboard and publishesPoseStamped
messages to control the position and yaw of the robot in a ROS (Robot Operating System) environment.Setup and Usage
Prerequisites
Installation
Clone the repository:
Ensure all dependencies are installed: Make sure you have
rospy
andgeometry_msgs
installed. You can typically install these usingrosdep
:Running the Script
Navigate to the script's directory:
Run the script:
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:
s : reset position to default
Author
Nadia Khodaei