Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6fc3c93
Showing
85 changed files
with
15,620 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Robotic arm - Pick & Place project | ||
|
||
Make sure you are using robo-nd VM or have Ubuntu+ROS installed locally. | ||
|
||
### One time Gazebo setup step: | ||
Check the version of gazebo installed on your system using a terminal: | ||
```sh | ||
$ gazebo --version | ||
``` | ||
To run projects from this repository you need version 7.7.0+ | ||
If your gazebo version is not 7.7.0+, perform the update as follows: | ||
```sh | ||
$ 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 | ||
``` | ||
|
||
Once again check if the correct version was installed: | ||
```sh | ||
$ gazebo --version | ||
``` | ||
### For the rest of this setup, ros_ws is the name of active ROS Workspace, if your workspace name is different, change the commands accordingly | ||
|
||
If you do not have an active ROS workspace, you can create one by: | ||
```sh | ||
$ mkdir -p ~/ros_ws/src | ||
$ cd ~/ros_ws/ | ||
$ catkin_make | ||
``` | ||
|
||
Now that you have a workspace, clone or download this repo into the **src** directory of your workspace: | ||
```sh | ||
$ cd ~/ros_ws/src | ||
$ git clone https://github.com/udacity/test_repo_robond_robotic_arm_pick_and_place.git | ||
$ mv test_repo_robond_robotic_arm_pick_and_place/kinematics_project/ . | ||
$ sudo rm -r test_repo_robond_robotic_arm_pick_and_place/ | ||
``` | ||
|
||
Now from a terminal window: | ||
|
||
```sh | ||
$ cd ~/ros_ws | ||
$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y | ||
$ cd ~/ros_ws/src/kinematics_project/kuka_arm/scripts | ||
$ sudo chmod +x target_spawn.py | ||
$ sudo chmod +x IK_server.py | ||
$ sudo chmod +x safe_spawner.sh | ||
``` | ||
Build the project: | ||
```sh | ||
$ cd ~/ros_ws | ||
$ catkin_make | ||
``` | ||
|
||
Add following to your .bashrc file | ||
``` | ||
export GAZEBO_MODEL_PATH=~/ros_ws/src/kinematics_project/kuka_arm/models | ||
source ~/ros_ws/devel/setup.bash | ||
``` | ||
|
||
For demo mode make sure the **demo** flag is set to _"true"_ in `inverse_kinematics.launch` file under /kinematics_project/kuka_arm/launch | ||
|
||
In addition, you can also control the spawn location of the target object in the shelf. To do this, modify the **spawn_location** argument in `target_description.launch` file under /kinematics_project/kuka_arm/launch. 0-9 are valid values for spawn_location with 0 being random mode. | ||
|
||
You can launch the project by | ||
```sh | ||
$ cd ~/ros_ws/src/kinematics_project/kuka_arm/scripts | ||
$ ./safe_spawner.sh | ||
``` | ||
|
||
If you are running in demo mode, this is all you need. To run your own Inverse Kinematics code change the **demo** flag described above to _"false"_ and run your code (once the project has successfully loaded) by: | ||
```sh | ||
$ cd ~/ros_ws/src/kinematics_project/kuka_arm/scripts | ||
$ rosrun kuka_arm IK_server.py | ||
``` | ||
Once Gazebo and rviz are up and running, make sure you see following in the gazebo world: | ||
|
||
- Robot | ||
|
||
- Shelf | ||
|
||
- Blue cylindrical target in one of the shelves | ||
|
||
- Dropbox right next to the robot | ||
|
||
|
||
If any of these items are missing, report as an issue. | ||
|
||
Once all these items are confirmed, open rviz window, hit Next button. | ||
|
||
To view the complete demo keep hitting Next after previous action is completed successfully. | ||
|
||
Since debugging is enabled, you should be able to see diagnostic output on various terminals that have popped up. | ||
|
||
The demo ends when the robot arm reaches at the top of the drop location. | ||
|
||
There is no loopback implemented yet, so you need to close all the terminal windows in order to restart. | ||
|
||
In case the demo fails, close all three terminal windows and rerun the script. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Changelog for package gazebo_grasp_plugin | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
1.0.1 (2016-06-08) | ||
------------------ | ||
* Fixed cmake files for jenkins builds | ||
* Contributors: Jennifer Buehler | ||
|
||
1.0.0 (2016-06-07) | ||
------------------ | ||
* Initial release | ||
* Contributors: Jennifer Buehler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(gazebo_grasp_plugin) | ||
|
||
add_definitions(-std=c++11) | ||
|
||
## Find catkin macros and libraries | ||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) | ||
## is used, also find other catkin packages | ||
find_package(catkin REQUIRED COMPONENTS | ||
gazebo_ros | ||
geometry_msgs | ||
roscpp | ||
std_msgs | ||
) | ||
|
||
find_package(gazebo REQUIRED) | ||
|
||
## Uncomment this if the package has a setup.py. This macro ensures | ||
## modules and global scripts declared therein get installed | ||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html | ||
# catkin_python_setup() | ||
|
||
################################### | ||
## catkin specific configuration ## | ||
################################### | ||
## The catkin_package macro generates cmake config files for your package | ||
## Declare things to be passed to dependent projects | ||
## INCLUDE_DIRS: uncomment this if you package contains header files | ||
## LIBRARIES: libraries you create in this project that dependent projects also need | ||
## CATKIN_DEPENDS: catkin_packages dependent projects also need | ||
## DEPENDS: system dependencies of this project that dependent projects also need | ||
catkin_package( | ||
INCLUDE_DIRS include | ||
LIBRARIES gazebo_grasp_fix | ||
CATKIN_DEPENDS gazebo_ros geometry_msgs roscpp std_msgs | ||
DEPENDS gazebo | ||
) | ||
|
||
########### | ||
## Build ## | ||
########### | ||
|
||
## Specify additional locations of header files | ||
## Your package locations should be listed before other locations | ||
# include_directories(include) | ||
include_directories( | ||
include | ||
${catkin_INCLUDE_DIRS} | ||
${GAZEBO_INCLUDE_DIRS} | ||
) | ||
|
||
link_directories( | ||
${GAZEBO_LIBRARY_DIRS} | ||
${catkin_LIBRARY_DIRS} | ||
) | ||
|
||
## Declare a cpp library | ||
add_library(gazebo_grasp_fix SHARED src/GazeboGraspFix.cpp src/GazeboGraspGripper.cpp) | ||
|
||
## Add cmake target dependencies of the executable/library | ||
## as an example, message headers may need to be generated before nodes | ||
# add_dependencies(gazebo_grasp_plugin_node gazebo_grasp_plugin_generate_messages_cpp) | ||
add_dependencies(gazebo_grasp_fix ${catkin_EXPORTED_TARGETS}) | ||
|
||
## Specify libraries to link a library or executable target against | ||
|
||
target_link_libraries(gazebo_grasp_fix | ||
${GAZEBO_LIBRARIES} | ||
${Boost_LIBRARIES} | ||
) | ||
|
||
############# | ||
## Install ## | ||
############# | ||
|
||
# all install targets should use catkin DESTINATION variables | ||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html | ||
|
||
## Mark executable scripts (Python etc.) for installation | ||
## in contrast to setup.py, you can choose the destination | ||
# install(PROGRAMS | ||
# scripts/my_python_script | ||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
# ) | ||
|
||
## Mark executables and/or libraries for installation | ||
install(TARGETS gazebo_grasp_fix | ||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) | ||
|
||
## Mark cpp header files for installation | ||
install(DIRECTORY include/${PROJECT_NAME}/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | ||
FILES_MATCHING PATTERN "*.h" | ||
) | ||
|
||
install(DIRECTORY launch | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
FILES_MATCHING PATTERN "*.launch" | ||
) | ||
|
||
## Mark other files for installation (e.g. launch and bag files, etc.) | ||
# install(FILES | ||
# # myfile1 | ||
# # myfile2 | ||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
# ) | ||
|
||
############# | ||
## Testing ## | ||
############# | ||
|
||
## Add gtest based cpp test target and link libraries | ||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_gazebo_grasp_plugin.cpp) | ||
# if(TARGET ${PROJECT_NAME}-test) | ||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) | ||
# endif() | ||
|
||
## Add folders to be run by python nosetests | ||
# catkin_add_nosetests(test) |
Oops, something went wrong.