Code Monkey home page Code Monkey logo

ros_remote_controller's Introduction

Chack out refreshed version:

Please note this app was made by beginners, there are some bad practices like not disposing some objects, architecture and project structure is also not great but it makes a really easy example to follow. If you're interested only in navigation check out this repo (no web-views used): https://github.com/Rongix/ros_navigation_command_app

ROS Teleop Application

This is a Flutter multiplatform (Android & iOS) project for interacting with ROS Robots based on ROS Melodic/Kinetic. Main function of the app is teleoperation of robots using virtual controller and camera view from the web server. For interfacing with ROS we use https://github.com/Sashiri/ros_nodes please check it out.

Project is presented as interactive interface for mobile robot that can be used for medical purposes and can be controlled remotely by virtual controller or point-click navigation on the map.

Getting Started

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Prerequisites

Installation

Installation of ROS

ROS kinetic: please follow instruction ROS Melodic: Instruction for Ubuntu 18.04 below:

  1. Following step will update your system and install ROS-Melodic-dekstop-full version. It will also create few aliases and source ROS-melodic environment in your .bashrc, and create catkin_ws folder in your root directory.
sudo apt update
sudo apt upgrade -y
wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros_melodic.sh && chmod 755 ./install_ros_melodic.sh && bash ./install_ros_melodic.sh
  1. Install dependencies.
sudo apt install ros-melodic-joy ros-melodic-teleop-twist-joy ros-melodic-teleop-twist-keyboard ros-melodic-laser-proc ros-melodic-rgbd-launch ros-melodic-depthimage-to-laserscan ros-melodic-rosserial-arduino ros-melodic-rosserial-python ros-melodic-rosserial-server ros-melodic-rosserial-client ros-melodic-rosserial-msgs ros-melodic-amcl ros-melodic-map-server ros-melodic-move-base ros-melodic-urdf ros-melodic-xacro ros-melodic-compressed-image-transport ros-melodic-rqt-image-view ros-melodic-gmapping ros-melodic-navigation ros-melodic-interactive-markers
  1. Install packages for Turtlebot3 (it contains node for simulation).
cd ~/catkin_ws/src/
git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
cd ~/catkin_ws && catkin_make
  1. In the next steps you should configure your network.
sudo nano ~/.bashrc
// EDIT FIELDS: Replace with your ip adress. Please not that you should not use http://localhost:11311 because it won't work.
// Get your ip with: hostname -I
// EXAMPLE: export ROS_MASTER_URI=http://192.221.1.11:11311
// EXAMPLE: export ROS_HOSTNAME=192.221.1.11
// REPLACE: 192.221.1.11 with your ip.
  1. Install camera package.
cd ~/catkin_ws/src/
git clone https://github.com/OTL/cv_camera.git
cd ~/catkin_ws && catkin_make

// EXAMPLE of use: rosparam set cv_camera/device_id 001
// EXAMPLE of use: rosrun cv_camera cv_camera_node
  1. Install rosbridge-server
sudo apt install ros-melodic-rosbridge-server
  1. Install ros-web-video-server.
sudo apt install ros-melodic-web-video-server
  1. Export ROS parameters; simulated robot model. I use waffle_pi. Add appropriete line to your bashrc.
export TURTLEBOT3_MODEL=waffle_pi

Installation of Node.js

You can install it with snap or grab installer from official site.

sudo snap install node --classic

Install node http-server.

npm install http-server

Grab RosHTTPNavigationMap and run the server. You will be able to see robot position on the map and move it by placing markers.

git clone https://github.com/Rongix/RosHTTPNavigationMap.git

Running ROS with application.

Refer ROBOTIS e-Manual for more information.

Launch ROS

Read instruction how to use launch nodes and fake node in simulation chapter.

roscore
roslaunch turtlebot3_fake turtlebot3_fake.launch
roslaunch turtlebot3_gazebo turtlebot3_house.launch
roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
roslaunch turtlebot3_navigation turtlebot3_navigation.launch 
//NOTE: This is example, adjust paths to launch files.
roslaunch '/home/rongix/catkin_ws/src/turtlebot3/turtlebot3_navigation/launch/move_base.launch'

Launch web components

//NOTE: rosbridge_websocket starts on port 9090
roslaunch rosbridge_server rosbridge_websocket.launch

//NOTE: web_video_server starts on port 8080
rosrun web_video_server web_video_server

//NOTE: default port of http-server is 8080, I recommend starting it on something else\
~/RosHTTPNavigationMap$ http-server -p 1234

License

This project is licensed under Apache License 2.0.

ros_remote_controller's People

Contributors

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

Watchers

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