Giter VIP home page Giter VIP logo

juanesb230 / reactnative_ros_app Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 6.0 8.27 MB

The App is a ROS node that can communicate with the master with rosbridge. For the frond-end I use native-base and for the ROS interaction I use roslibjs. This app use Redux and Redux-persist for managing the states of the app

JavaScript 83.10% Starlark 0.37% Java 3.86% Objective-C 2.73% Ruby 3.30% CMake 4.41% Python 2.22%
react-native react-redux roslibjs ros-melodic teleoperation-mode trajectory-mode native-base

reactnative_ros_app's Introduction

React Native App for a differential mobile robot

1. Prerequisites

Have installed on your computer, ROS Melodic, ROS Melodic packages: gazebo ros plugin, gazebo ros, react-native.

Having created a catkin workspace.

2. Packages

The ReactNativeControl folder has the control of robot and the interaction with the reat-native app. If you want to use the same robot, I invite you a my other porject a clone the repository:

https://github.com/Juanesb230/PYQT-RVIZ

The react-native app is into NativePrueba folder online clone the repository, go to the NativePrueba folder and puth the followings command:

npm option:

npm install

or yarn option:

yarn install

runs the aplication with an emulator of your phone:

react-native run-android

For the master, you have to init the rosbridge server with this command:

roslaunch rosbridge_server rosbridge_websocket.launch

If you want to use the robot designed, you have to install the package of the previous link in your catkin workspace, and put the following command in other terminal:

roslaunch diferencial 01-diferencial.launch

Finally, have to run the control node, for that you have to install as package the ReactNativeControl folder in your catkin workspace and put the next line:

rosrun ReactNativeControl ControlReactNative.py

3. Description

The App is a ROS node that can communicate with the master with rosbridge. For the frond-end I use native-base and for the ROS interaction I use roslibjs. This app use Redux and Redux-persist for managing the states of the app, as you can see in the animation:

And the next animation shows the communication of the App with the master node with rosbridge.

4. Results

In this demostration I use my Android cellphone and ApowerMirror for shows the screen of phone. If you want to use ApowerMirror you can donwload in the next link:

https://www.apowersoft.es/phone-mirror

This app publish a topic named "/mode" for the controller know if the app user is in teleoperation, posture or trajectory control mode. The next Table shows the messages sends to the topic "/mode" depending the app mode operation that the ControlReactNative node is suscribed:

Mode Message (stds_msgs:string)
Teleoperation 'Teleoperation'
Posture Control 'Posture Control'
Trajectory Control 'Tray Control'

For teleoperation mode, you can chose the name topic to publihs velocities of robot. For my robot, the name topic is "/mobile_base_controller/cmd_vel", this animation shows the teleoperation mode.

In the settings button, you can set the velocities of robot.

In the posture control mode, the user can set the X, Y position and the robot is going to that point. The x and y references is sending as ROS´parameters. The next animation shows the posture control mode of the robot.

Finally the trajectory mode, this mode the user can chose the trajectory of the robot. When you chose a different trajectory the app sends a ROS' parameter named TrayMode. The following animation shows this mode.

5. Contact with me

Linkedin: <www.linkedin.com/in/juan-balseca-pinto-9117b397>

reactnative_ros_app's People

Contributors

juanesb230 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

reactnative_ros_app's Issues

Discussion on ROS discourse - app to publish sensor data to ROS

Hi there, apologies this is not an issue, I'm just using this as a way to contact you, I hope that's OK.

I thought you might be interested in the discussion I've started on discourse:
https://discourse.ros.org/t/project-proposal-mobile-app-for-publishing-sensor-data-ar-pose-and-depth/32497

I've linked to your project as an example of a react native app communicating with ROS.

I'd be interested in your thoughts on the prospect of developing an app for publishing sensor data from a phone to ROS, in particular if you think it would be feasible to access camera, IMU, and preferably ARCore APIs from the react native app. I've never worked with react/javascript, so I'm not sure if there would be any difficulties here.

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.