Code Monkey home page Code Monkey logo

myp_ros's Introduction

Running ROS with MyP

Building

If you do not already have a catkin workspace set up please set one up according to this tutorial http://wiki.ros.org/catkin/Tutorials/create_a_workspace.

Place the myp_ros directory in the source folder of your catkin workspace and build by calling either catkin_make or catkin build . To use this package in a terminal shell, you must first run:

$ source PATH_TO_CATKIN_WS/devel/setup.bash

Where PATH_TO_CATKIN_WS is the location of your catkin workspace. To have this package available in every terminal shell opended, you may add this line to your .bashrc via:

$ echo "source PATH_TO_CATKIN_WS/devel/setup.bash" >> ~/.bashrc

Runtime

On startup, the PRob will begin a roscore as well as a node which provides both the ROS communication and the browser based interface. Only one of these communication channels can be used to send commands to the robot at a time however after connecting over ROS, all outgoing information continues to be published their corresponding topics even after switching connections to the browser.

To use the same ROS Master as the PRob you must first have your machine appropriately set up for ROS network communication according to http://wiki.ros.org/ROS/NetworkSetup. You must then export the correct master URI. Open up a terminal and enter:

$ export ROS_MASTER_URI=http://<PROB_IP>:11311

Where <PROB_IP> is the IP address of your PRob. In some system, you might need to manually set the ROS_IP using

$ export ROS_IP=<YOUR_IP>

To see your IP you can use the command: hostname -I

To test this connection, make sure there is no roscore running locally on your machine and check for available services with:

$ rosservice list

You should see a list of services. To open up all channels of communication over ROS, use the ROS service 'connect' provided by the PRob.

The first parameter must be a string, either 'real' or 'no_robot' depending on whether you want, the second is a string detailing your robot model, e.g 'PRob2R', the third parameter, also a string, determines the calibration type, which should always be 'default'.

To see each of the services provided and their parameters, look in the myp_ros/srv directory. To see a basic example of each service, as well as subscription to each topic, see the node example.py located in myp_ros/scripts

Extras

Joystick controller

The node joy_control.py subscribes to the joy topic to allow a user to use a joystick to move the end effector in steps. Inorder to use this functionality, set up your machine to run a joy_node according to the following tutorial http://wiki.ros.org/joy/Tutorials/ConfiguringALinuxJoystick. Remember to export the MyP ROS_MASTER_URI in all your peripheral nodes.

The mapping used for this controller is that of a Sony PS3 Controller, you may need to change the mappings in the node if your controller does not follow the same pattern. The loop rate in the node can be adjusted to you choosing. The reference position updates much faster than the movement commands sent, so with a slower rate you have more time to adjust the desired position before the robot is told to move there.

myp_ros's People

Contributors

pworsnop avatar dpatricia avatar mpm-fprob avatar

Watchers

James Cloos avatar Bruno Brito 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.