GithubHelp home page GithubHelp logo

knjinki / raspimouse_game_controller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zaki0929/raspimouse_game_controller

0.0 0.0 0.0 498 KB

Package for operating Raspberry Pi Mouse with a controller

License: BSD 3-Clause "New" or "Revised" License

CMake 61.04% Python 38.96%

raspimouse_game_controller's Introduction

raspimouse_game_controller

Package for operating Raspberry Pi Mouse with some kinds of game controllers.

This package supports the following controllers:

  • DUALSHOCK 4
  • Logicool Wireless Gamepad F710

Requirements

This package requires the following to run:

  • Ubuntu
    • Ubuntu 16.04 (Ubuntu 16.04 Server recomended)
  • ROS
    • Kinetic Kame
  • ROS Package

Installation

First of all, install the latest stable version of ROS.
Please refer to ROS WiKi for installation.

Next, download the dependent ROS package into ~/catkin_ws/src and build it.

cd ~/catkin_ws/src
git clone https://github.com/ryuichiueda/raspimouse_ros_2.git
cd ~/catkin_ws && catkin_make && source ~/catkin_ws/devel/setup.bash

Finally, download this repository and build it.

cd ~/catkin_ws/src
git clone https://github.com/zaki0929/raspimouse_game_controller.git
cd ~/catkin_ws && catkin_make && source ~/catkin_ws/devel/setup.bash

Usage

ps4_cmd_vel.py

This is a script for connecting Raspberry Pi Mouse to a DUALSHOCK 4.

To use this script with raspimouse_ros_2, input the following commands.

$ roslaunch raspimouse_ros_2 raspimouse.launch 
$ rosrun joy joy_node 
$ rosrun raspimouse_game_controller ps4_cmd_vel.py

How to Control

To give motion command, you must press the button drawn a square. With the press, you can control the robot with the four arrow buttons.
By pressing the up/down button, you can give the velocity of front/back direction respectively.
Angular velocity can be then given by pressing the right or left button.

logicool_cmd_vel.py

This is a script for connecting Raspberry Pi Mouse to a Logicool Wireless Gamepad F710.

To use this script with raspimouse_ros_2, input the following commands.

$ roslaunch raspimouse_game_controller run_with_base_nodes.launch

Any jsX joy-device can be specified and used with "dev" option, for example:

$ roslaunch raspimouse_game_controller run_with_base_nodes.launch dev:=/dev/input/js1

How to Control

Beforehand, select DirectInput(D) mode, and the MODE button must be pressed and the LED beside the button must be lit.

With the press of the X button, you can control the robot with the four arrow buttons. By pressing the up/down button, you can give the velocity of front/back direction respectively.
Angular velocity can be then given by pressing the right or left button.

raspimouse_game_controller's People

Contributors

zaki0929 avatar ryuichiueda avatar tiryoh 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.