Giter Site home page Giter Site logo

teleop_twist_keyboard's Introduction

teleop_twist_keyboard

Generic Keyboard Teleoperation for ROS

Run

ros2 run teleop_twist_keyboard teleop_twist_keyboard

Publishing to a different topic (in this case my_cmd_vel).

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel:=my_cmd_vel

Usage

This node takes keypresses from the keyboard and publishes them as Twist
messages. It works best with a US keyboard layout.
---------------------------
Moving around:
   u    i    o
   j    k    l
   m    ,    .

For Holonomic mode (strafing), hold down the shift key:
---------------------------
   U    I    O
   J    K    L
   M    <    >

t : up (+z)
b : down (-z)

anything else : stop

q/z : increase/decrease max speeds by 10%
w/x : increase/decrease only linear speed by 10%
e/c : increase/decrease only angular speed by 10%

CTRL-C to quit

Parameters

  • stamped (bool, default: false)
    • If false (the default), publish a geometry_msgs/msg/Twist message. If true, publish a geometry_msgs/msg/TwistStamped message.
  • frame_id (string, default: '')
    • When stamped is true, the frame_id to use when publishing the geometry_msgs/msg/TwistStamped message.

teleop_twist_keyboard's People

Contributors

agyoungs avatar asukiaaa avatar clalancette avatar dirk-thomas avatar k-okada avatar kk6axq avatar liohau avatar lucasw avatar matthijsburgh avatar mikaelarguedas avatar mikepurvis avatar thorstink avatar trainman419 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teleop_twist_keyboard's Issues

Launch failed

I have written simple launch file to run this node.
But it occured termios error and didn't run.

[ros2-1]     settings = termios.tcgetattr(sys.stdin)
[ros2-1] termios.error: (25, 'Inappropriate ioctl for device')

How can I fix this?

Crashes immediately on Windows

This package relies on the termios and tty python packages, which are not available on Windows. When attempting to launch the node, I get an immediate error message:

C:\Users\dan\Documents\ros2_ws>ros2 run teleop_twist_keyboard teleop_twist_keyboard
Traceback (most recent call last):
  File "C:\Users\dan\Documents\ros2_ws\install\teleop_twist_keyboard\lib\teleop_twist_keyboard\teleop_twist_keyboard-script.py", line 11, in <module>
    load_entry_point('teleop-twist-keyboard', 'console_scripts', 'teleop_twist_keyboard')()
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 2434, in load
    return self.resolve()
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "C:\Users\dan\Documents\ros2_ws\build\teleop_twist_keyboard\teleop_twist_keyboard.py", line 36, in <module>
    import termios
ModuleNotFoundError: No module named 'termios'

Humble (stamped) Support

I am currently running ROS2 humble and stamped messages do not appear to be working. Ros2_control recently updated their repo to default to stamped messages which I think may cause many people to run into issues. Has anyone come up with a way to support stamped messages in humble?

Subscribers to cmd_vel not working when using teleop

Hi;
I tried using teleop_twist_keyboard that came with my crystal install. I also tried the latest version here on the crystal and master branch...

I can run it, and published twists and see through ros2 topic echo /cmd_vel that is publishes correctly. If I launch a simple node (the same as a minimal-subscriber example, e.g. from here but use geometry::msg::Twist instead of std_msgs::String it does not work (the callback should print something to the console and it does not).

Checking with ros2 topic info /cmd_vel shows that there is a subscriber and a publisher, so it does seem something works...

However, if I manually publish something the cmd_vel using ros2 topic pub /cmd_vel geometry_msgs/Twist "{linear: {x: 0.1, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}" the callback is triggered. ros2 topic info /cmd_vel then also shows there are two publishers active and one subscriber - which is correct.

So. I have little clue, but it seems like a bug. Or is there something I am missing?

Thanks for your time.

Axis-System rotation config

I have a robot which has a 90° rotated coordinate system (y-axis is forward/back and x-axis is sideways).

Therefore, it would be nice to be able to rotate the system for the teleop as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.