Giter Club home page Giter Club logo

simple_arm's Introduction

Udacity - Robotics NanoDegree Program

simple_arm

A mini-project to better explain pub-sub architecture in ROS

How to Launch the simulation?

Make sure you have all the required ROS packages installed, and that this package is in your ROS workspace (assumed ot be ~/catkin_ws.

$ cd ~/catkin_ws
$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y

If you have not built your workspace do it now (make sure you are inside the workspace root directory):

$ catkin_make

Once the simple_arm package has been built, you can launch the simulation environment using:

$ source ~/catkin_ws/devel/setup.bash
$ roslaunch simple_arm robot_spawn.launch

Please note that if you are having trouble with roslaunch simple_arm robot_spawn.launch please try the safe_spawner.sh script in the scripts folder. You can launch by using $ ./safe_spawner.sh in a terminal of your choice

Robot can be controlled by publishing joint values to joint controller topics:

/simple_arm/joint_1_position_controller/command
/simple_arm/joint_2_position_controller/command

In a separate terminal type this command to control joint_1:

$ rostopic pub -1 /simple_arm/joint_1_position_controller/command std_msgs/Float64 "data: 1.5"

To control joint_2:

$ rostopic pub -1 /simple_arm/joint_2_position_controller/command std_msgs/Float64 "data: 1.5"

Note: Change the value of "data" argument to change joint_position values.

How to view image stream from the camera?

Camera image stream is published to following topic:

/rgb_camera/image_raw

This stream can be viewed by folliwng command in separate terminal:

$ rosrun image_view image_view image:=/rgb_camera/image_raw

If you encounter an error and gazebo crashes while vieweing camera stream, you need to upgrade gazebo7 to gazebo7.6:

$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install gazebo7

simple_arm's People

Contributors

kylesf avatar adammalpass avatar

Watchers

Masahiro Rikiso 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.