Giter Club home page Giter Club logo

remote-access-rover-with-ros's Introduction

Remote-Access-Rover-with-ROS

A repository for a 6-wheel rocker bogie rover, based on Robotic Operative System ROS and python to control its perception and action systems. This repository contents:

  • source codes.
  • dev scripts (Python | ROS)
  • Watch the YouTube video here
  • Doc

Hardware elements

  • Nvidia Jetson TK1: Lib
  • Ion Motion Roboclaw, Dual DC motor driver: Lib
  • Pololu USB servo Control: POL-1353
  • Logitech Wireless Gamepad F710
  • PC host running Ubuntu

Software requirements

  • Python 2.7.15
  • Rviz from ROS
  • ROS Kinetic for Ubuntu 16.04 or Indigo for Ubuntu 14.04 on user PC.
  • ROS Indigo for Ubuntu 14.04 (armhf) on Jetson TK1.

Getting Started on Jetson TK1

The following steps describe how to configure the Jetson TK1.

  • Install ROS
  • Install nano: sudo apt-get install nano
  • Install Git: sudo apt-get install git-core
  • Install Hamachi
  • Remove sudo pass: sudo visudo
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

And replace those lines for these:

# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD: ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
  • USB Rules Look for your USB devices info: udevadm info -a -n /dev/ttyUSB1 | grep Create this file with your idVendor and idProduct info: sudo nano /etc/udev/rules.d/99-robot.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2404", SYMLINK+="tty_roboclaw"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0424", ATTRS{idProduct}=="9514", SYMLINK+="tty_pololu"

Save and run: sudo udevadm trigger sudo chmod 777 /dev/tty_roboclaw sudo chmod 777 /dev/tty_pololu

Installing USB camera on ROS

  • Plug in the USB camera and check if it was recognized by system: lsusb ls /dev | grep video*

  • Install usb_cam ROS node: sudo apt install ros-indigo-usb-cam

Functions to add on Jetson's .bashrc file

nano .bashrc

source /opt/ros/indigo/setup.bash

function arm {
        sudo chmod 777 /dev/tty_pololu
        python /home/ubuntu/Desktop/Mercury/arm.py
        sleep 1
        echo $"Arm OK..."
}

function exportar {
        export ROS_IP = {JetsonIP}
        export ROS_MASTER_URI = http://{pcIP}:11311
}

# If want to connect through hamachi
function exportar_hamachi {
        export ROS_IP = {JetsonHamachiIP}
        export ROS_MASTER_URI=http://{pcHamachiIP}:11311
}

#Launch main webcam
function webcam {
	roslaunch usb_cam usb_cam-test.launch &
        sleep 5
        echo $"Main camera ready..."
}

function run {
        sudo chmod 777 /dev/tty_roboclaw
        source /home/ubuntu/rbcw_ws/devel/setup.bash
        roslaunch roboclaw_node roboclaw.launch &
        sleep 3
        echo $"Run Launched"
}

function kinect {
	roslaunch freenect_launch freenect.launch
}

function ekf {
        python ~/Desktop/Mercury/ekf.py
}

function imu_node {
	sudo chmod 777 /dev/ttyUSB0
	source /home/ubuntu/xsens_ws/devel/setup.bash
	roslaunch xsens_driver xsens.launch
}


# Main function
function rover {
        roscore &
        sleep 4
        piloto &
        echo $"Launched piloto"
        sleep 2
        run &
        sleep 2
        echo $"Ready..."
}

sudo python /home/ubuntu/Desktop/Mercury/bash_config.py

Getting Started on host PC

  • Install ros according to your ubuntu version, in this case Ubuntu 16.04.
  • Install hamachi and haguichi.

Configuring a Linux-Supported Joystick with ROS

  • Install the package: sudo apt-get install ros-kinetic-joy
  • The joystick will be referred to by jsX: ls /dev/input
  • You can test it by running: sudo jstest /dev/input/jsX Move the joystick around to see the data change.
  • Give permissions on the joystick port: sudo chmod a+rw /dev/input/jsX
  • To start the joy node: roscore rosparam set joy_node/dev "/dev/input/jsX" rosrun joy joy_node To see the data from the joystick: rostopic echo joy

Functions to add on PC's .bashrc file

source /opt/ros/kinetic/setup.bash

function pilot
{
  ls -l /dev/input/jsX
  sudo chmod a+rw /dev/input/jsX
  rosparam set joy_node/dev "/dev/input/jsX"
  rosrun joy joy_node &
 }

# If want to connect through hamachi
function exportar_hamachi 
{
        export ROS_IP = {pcIP}
}

function exportar
{
  export ROS_IP = {pcIP}
}

# To access Jetson webcam image
function webcam
{
	python ~/cam_bridge.py
}

Autors

remote-access-rover-with-ros's People

Contributors

nicksongarciah avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.