ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

What is the workflow from typing a keyboard key to moving the robot?

asked 2020-11-06 04:43:02 -0500

orteip_94 gravatar image

updated 2023-06-18 09:58:06 -0500

lucasw gravatar image

Hello.

I wanted to know what was the specific workflow for passing data to a drone by typing commands from the keyboard (or joypad).

I'll explain:

When I start a launch in ROS + Gazebo with keyboard control (or joy) and press a button to make the drone move: how and where does the passage of the values (file and more) ​​for the final movement of the drone take place?

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-11-06 10:27:47 -0500

There isn't much to it. Typically the chain is relatively short:

  • client reads keys
  • client translates key presses into Twist messages and publishes them on the cmd_vel topic
  • a motor control (ROS) node receives these messages since it is subscribed to that topic
  • the motor control node translates the Twist commands into control signals to the motor drivers

You can inspect this chain using rostopic echo cmd_vel, where you will see what the teleop client (joystick, keyboard, rviz, whichever) is sending.

edit flag offensive delete link more

Comments

It is possible that the client i am using is not teleop. I followed a guide found on github at this link: https://github.com/ethz-asl/rotors_si...

In the description there is a section that concerns the control of the drone with the keyboard and follows the following guide: https://github.com/ethz-asl/rotors_si...

However I still don't know how they pass the values ​​from the python file for reading keyboard keys to the controller.

orteip_94 gravatar image orteip_94  ( 2020-11-10 02:51:55 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-11-06 04:43:02 -0500

Seen: 561 times

Last updated: Nov 06 '20