GithubHelp home page GithubHelp logo

gametl / teleop_joy_gta Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 357 KB

ros 2 package, tested on ROS2 Humble ARM64. This is just a fun project to control a robot. I played a lot of Grand Theft Auto(GTA) growing up and it's just muscle memory for me to control anything with wheels like this.

License: Apache License 2.0

Python 100.00%
arm64 bluetooth game-controller joystick ros-humble ros2 teleop teleop-twist-joy turtlebot3 xbox-controller

teleop_joy_gta's Introduction

About

ros 2 package, tested on ROS2 Humble ARM64

This is just a fun project to control a robot. I played a lot of Grand Theft Auto(GTA) growing up and it's just muscle memory for me to control anything with wheels like this.

Left trigger is break or reverse Right trigger is forward Left stick is steering (for differential drive robot this will rotate the robot)

Subcribed to : /Joy

Publish to : /cmd_vel

Feature

  • Output only linear_x and angular_z for diferential drive
  • Speed curve for adjustable fine-tune control at low or high speed image varies speed curve

Limitations

  • Currently only support the Xbox One Controller button inputs

  • TODO: ros launch file to execute both joy and teleop_joy_gta

Configuration

Adjust these parameter to your liking if you are using Ubuntu natively not on MacOS then set mac_keybind to False

# When using Ubuntu on Mac --> True
mac_keybind = True

# Set top speed
max_linear_x = float(0.31) #m/s
max_angular_z = float(2 * math.pi) #rad/s

# Set speed curve
trigger_curve = trigger_curve_dict["x_power_three"]

Installation

  1. git clone this repo into src of your ros workspace
  2. colcon build

Usage

image of running node and echoing the topic msgs

image of rqt_graph with gta node running

Run

Terminal 1:

# Run joy to accept controller and publish it as /joy
ros2 run joy joy_node

Terminal 2:

ros2 run teleop_joy_gta teleop_joy_gta_node

Inspect joy msg

Check button index ros2 topic echo /joy

Check lantency?? ros2 topic hz /joy

Inspect cmd_vel msg

Check speed ros2 topic echo /cmd_vel

ros2 topic hz /cmd_vel

Contribution

if you wanna contribute your controller configuration, please great an issue and considering contributing. Thank you and have run roboting.

teleop_joy_gta's People

Contributors

gametl avatar

Watchers

 avatar

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.