Skip to content

msrks/simple_arm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Complete simple arm package

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 65.0%
  • Python 32.5%
  • Shell 2.5%