Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
git clone https://github.com/NadiaKhodaei/rotors_simulator.git cd rotors_simulator
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:
cd /path/to/rotors_simulator/scripts
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