|
pr2eus_tutorials package from jsk_pr2eus repojsk_pr2eus pr2eus pr2eus_armnavigation pr2eus_impedance pr2eus_moveit pr2eus_openrave pr2eus_tutorials |
Package Summary
| Tags | No category tags. |
| Version | 0.3.14 |
| License | BSD |
| Build type | CATKIN |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/jsk-ros-pkg/jsk_pr2eus.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2019-04-27 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
Package Description
Additional Links
Maintainers
- Kei Okada
- Masaki Murooka
Authors
- Kei Okada
pr2eus_tutorials
This is a repository for tutorials of pr2eus
Installation
To play with this package, you can choose from two installation methods.
We assume the ROS environment is kinetic.
If you use ROS indigo distribution, please replace the word kinetic with indigo (or appropriate distributions).
Using pre-built package
- Follow the instruction of ROS installation
- Install the package
sudo apt install ros-kinetic-pr2eus-tutorials
- Load ROS Environment
source /opt/ros/kinetic/setup.bash`
Using source package
- Follow the instruction of ROS installation
- Setup catkin workspace
source /opt/ros/kinetic/setup.bash
sudo apt install python-catkin-tools python-wstool python-rosdep git
sudo rosdep init
rosdep update
# Create catkin workspace and download source repository
mkdir -p ~/ros/kinetic/src && cd ~/ros/kinetic/src
wstool init
wstool set jsk-ros-pkg/jsk_pr2eus --git https://github.com/jsk-ros-pkg/jsk_pr2eus.git -v master
wstool update
# Install dependencies for building the package
rosdep install --from-paths . -i -r -n -y
# Build the package
cd ~/ros/kinetic
catkin init
catkin build pr2eus_tutorials
- Load ROS Environment
source ~/ros/kinetic/devel/setup.bash`
Demos
PR2 Tabletop Object Detection
-
Startup nodes
First we need to start nodes used for this demo.
- Using a real robot
# on PR2 real robot
roslaunch pr2eus_tutorials pr2_tabletop.launch
You can locate a desk in front of the robot and put any objects on it.
- Using a simulator
you can set physics engine with roslaunch argument.
# on local machine
roslaunch pr2eus_tutorials pr2_tabletop_sim.launch physics:=dart
# It may take time to download materials for the first time
You can see the robot is spawned in a scene with a desk and some objects.
-
Run demo
Then we can now start the demo program for picking objects.
rosrun pr2eus_tutorials pr2-tabletop-object-grasp.l
After running the demo program above, you can see object bounding boxes in the `RViZ` window.
It means the robot now recognizes each objects as individual objects from camera sensor inputs.
You can click any object that you want the robot to pick up.

-
Step-by-step description of the demo program
In the bottom of the demo program
pr2-tabletop-object-grasp.l, you can see a main functiondemo.
(defun demo ()
(setq *grasping-object-p* nil)
(setq *arm* :rarm)
(setq *tfl* (instance ros::transform-listener :init))
(setq *tfb* (instance ros::transform-broadcaster :init))
(pr2-init)
(pr2-pregrasp-pose)
(wait-for-grasp-target))
The `(pr2-init)` method is just a initialization function for pr2 robot that instantiate two objects required for robot manipulation from euslisp:
- `*pr2*`: This object is a kinematic model for a PR2 robot. This object includes any fundamental functions for robot modeling such as inverse kinematics, dynamics, geometric constraints and so on. You can visualize this model by evaluating `(objects (list *pr2*))`.
- `*ri*`: This is an object that send a control signal to the actual robot from euslisp kinematics model and receive the result or actual states of the robot. `ri` is an abbreviation of `robot interface`.
Please note that `(pr2-init)` function is defined in `pr2-interface.l` in the `pr2eus` package.
In this demo program, the function is loaded in the top of the script:
(require :pr2-interface "package://pr2eus/pr2-interface.l")
After `(pr2-init)` is executed, the kinematic model looks like below:

After initialized the robot in euslisp, `(pr2-pregrasp-pose)` method is executed.
(defun pr2-pregrasp-pose ()
(send *pr2* :reset-manip-pose)
(send *ri* :angle-vector (send *pr2* :angle-vector) 5000)
(send *ri* :wait-interpolation))
The first line `(send *pr2* :reset-manip-pose)` changes the pose of euslisp kinematic model to the predefined pose called `reset-manip-pose`.
With calling this method, the actual robot does **NOT** move because this method only changes the states of the kinematic model. Instead you can see the current states of the kinematic model by `(objects (list *pr2*))`.
The kinematic model now looks like below:

The second line then send the current state of kinematic model to the actual robot.
The second argument `5000` allows the robot to take 5000 milliseconds to move to the pose. If the second argument is omitted, the default argument `3000` will be used.
After the second line, it will take 5 seconds until the robot ends to move, but the method call itself returns immediately.
The last method called in the last line is just for waiting for the robot until he ends to move to the specified pose.
Reach Object Demo
Reach Object Demo with PR2
# launch gazebo
roslaunch pr2_gazebo pr2_empty_world.launch
roslaunch pr2eus_tutorials spawn_objects.launch
# launch recognition
roslaunch jsk_pcl_ros hsi_color_filter.launch INPUT:=/wide_stereo/points2 h_min:=75 s_min:=50
# visualization
rviz -d `rospack find pr2eus_tutorials`/config/pr2_reach_object.rviz
# eus
roscd pr2eus_tutorials/euslisp
roseus reach-object.l
(pr2-setup)
(reach-object-demo)
Reach Object Demo with HRP2JSK
hrpsys_gazebo_tutorials is required.
(Currently, HRP2 model is not provided for open source projects.)
# launch gazebo
roslaunch hrpsys_gazebo_tutorials gazebo_hrp2jsk_no_controllers.launch
roslaunch pr2eus_tutorials spawn_objects.launch
# lanch hrpsys
rtmlaunch hrpsys_gazebo_tutorials hrp2jsk_hrpsys_bringup.launch KINEMATICS_MODE:=true
# launch recognition
roslaunch jsk_pcl_ros hsi_color_filter.launch INPUT:=/xtion/depth/points h_min:=75 s_min:=50
# visualization
rviz -d `rospack find pr2eus_tutorials`/config/hrp2jsk_reach_object.rviz
# eus
roscd pr2eus_tutorials/euslisp
roseus reach-object.l
(hrp2jsk-setup)
(reach-object-demo)
Could not convert RST to MD: No such file or directory - pandoc
Wiki Tutorials
Source Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
- launch/pr2_tabletop_grasp.launch
-
- run_rviz [default: false]
- manager [default: pr2_tabletop_object_detector_nodelet_manager]
- machine [default: c2]
- launch/pr2_tabletop.launch
-
- run_rviz [default: false]
- publish_objects_tf [default: true]
- launch_tracking [default: false]
- manager [default: pr2_tabletop_object_detector_nodelet_manager]
- machine [default: c2]
- load_machine [default: false]
- launch/tabletop_complete.launch
-
- flatten_table [default: false]
- model_set [default: REDUCED_MODEL_SET]
- tabletop_segmentation_points_input [default: narrow_stereo_textured/points2]
- launch/template_grasp.launch
-
- kinect_camera_name [default: openni]
- launch_object_manipulation [default: false]
- launch_realtime_tabletop [default: true]
- launch_objectdetection [default: false]
- launch/gazebo/pr2_template_grasp_sim.launch
-
- run_rviz [default: true]
- launch/gazebo/pr2_tabletop_sim.launch
-
- gui [default: true]
- run_rviz [default: true]
- publish_objects_tf [default: true]
- physics [default: ode]
- launch/gazebo/spawn_cylinder.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: cylinder]
- color [default: Green]
- length [default: 0.2]
- radius [default: 0.05]
- launch/gazebo/pr2_gazebo_empty.launch
-
- RUN_RVIZ [default: true]
- LAUNCH_NAVI [default: true]
- LAUNCH_BASE_CONTROLLER [default: true]
- launch/gazebo/pr2_tabletop_grasp_sim.launch
-
- run_rviz [default: true]
- launch/gazebo/pr2_interactive_manipulation_sim.launch
- launch/gazebo/spawn_box.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: box]
- color [default: Green]
- size_x [default: 0.5]
- size_y [default: 0.5]
- size_z [default: 0.5]
- launch/gazebo/spawn_model_in_database.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: table_model]
- type_name [default: table]
- launch/gazebo/spawn_objects.launch
- launch/gazebo/gazebo_image_relay.launch
- launch/gazebo/pr2_tabletop_scene.launch
-
- gui [default: true]
- physics [default: ode]
- launch/gazebo/pr2_gazebo_objects.launch
-
- run_rviz [default: true]
- table_x_pos [default: 0.0]
- launch/gazebo/pr2_gazebo_startup.launch
-
- launch_empty_map [default: true]
- launch_move_base [default: true]
- launch_move_tilt_scan [default: true]
- launch_moveit [default: false]
- launch_moveit_gui [default: false]
- launch_openni [default: true]
- apps/tabletop_grasp/tabletop_grasp.xml
Messages
Services
Plugins
Recent questions tagged pr2eus_tutorials at answers.ros.org
|
pr2eus_tutorials package from jsk_pr2eus repojsk_pr2eus pr2eus pr2eus_armnavigation pr2eus_impedance pr2eus_moveit pr2eus_openrave pr2eus_tutorials |
Package Summary
| Tags | No category tags. |
| Version | 0.3.14 |
| License | BSD |
| Build type | CATKIN |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/jsk-ros-pkg/jsk_pr2eus.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2019-04-27 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
Package Description
Additional Links
Maintainers
- Kei Okada
- Masaki Murooka
Authors
- Kei Okada
pr2eus_tutorials
This is a repository for tutorials of pr2eus
Installation
To play with this package, you can choose from two installation methods.
We assume the ROS environment is kinetic.
If you use ROS indigo distribution, please replace the word kinetic with indigo (or appropriate distributions).
Using pre-built package
- Follow the instruction of ROS installation
- Install the package
sudo apt install ros-kinetic-pr2eus-tutorials
- Load ROS Environment
source /opt/ros/kinetic/setup.bash`
Using source package
- Follow the instruction of ROS installation
- Setup catkin workspace
source /opt/ros/kinetic/setup.bash
sudo apt install python-catkin-tools python-wstool python-rosdep git
sudo rosdep init
rosdep update
# Create catkin workspace and download source repository
mkdir -p ~/ros/kinetic/src && cd ~/ros/kinetic/src
wstool init
wstool set jsk-ros-pkg/jsk_pr2eus --git https://github.com/jsk-ros-pkg/jsk_pr2eus.git -v master
wstool update
# Install dependencies for building the package
rosdep install --from-paths . -i -r -n -y
# Build the package
cd ~/ros/kinetic
catkin init
catkin build pr2eus_tutorials
- Load ROS Environment
source ~/ros/kinetic/devel/setup.bash`
Demos
PR2 Tabletop Object Detection
-
Startup nodes
First we need to start nodes used for this demo.
- Using a real robot
# on PR2 real robot
roslaunch pr2eus_tutorials pr2_tabletop.launch
You can locate a desk in front of the robot and put any objects on it.
- Using a simulator
you can set physics engine with roslaunch argument.
# on local machine
roslaunch pr2eus_tutorials pr2_tabletop_sim.launch physics:=dart
# It may take time to download materials for the first time
You can see the robot is spawned in a scene with a desk and some objects.
-
Run demo
Then we can now start the demo program for picking objects.
rosrun pr2eus_tutorials pr2-tabletop-object-grasp.l
After running the demo program above, you can see object bounding boxes in the `RViZ` window.
It means the robot now recognizes each objects as individual objects from camera sensor inputs.
You can click any object that you want the robot to pick up.

-
Step-by-step description of the demo program
In the bottom of the demo program
pr2-tabletop-object-grasp.l, you can see a main functiondemo.
(defun demo ()
(setq *grasping-object-p* nil)
(setq *arm* :rarm)
(setq *tfl* (instance ros::transform-listener :init))
(setq *tfb* (instance ros::transform-broadcaster :init))
(pr2-init)
(pr2-pregrasp-pose)
(wait-for-grasp-target))
The `(pr2-init)` method is just a initialization function for pr2 robot that instantiate two objects required for robot manipulation from euslisp:
- `*pr2*`: This object is a kinematic model for a PR2 robot. This object includes any fundamental functions for robot modeling such as inverse kinematics, dynamics, geometric constraints and so on. You can visualize this model by evaluating `(objects (list *pr2*))`.
- `*ri*`: This is an object that send a control signal to the actual robot from euslisp kinematics model and receive the result or actual states of the robot. `ri` is an abbreviation of `robot interface`.
Please note that `(pr2-init)` function is defined in `pr2-interface.l` in the `pr2eus` package.
In this demo program, the function is loaded in the top of the script:
(require :pr2-interface "package://pr2eus/pr2-interface.l")
After `(pr2-init)` is executed, the kinematic model looks like below:

After initialized the robot in euslisp, `(pr2-pregrasp-pose)` method is executed.
(defun pr2-pregrasp-pose ()
(send *pr2* :reset-manip-pose)
(send *ri* :angle-vector (send *pr2* :angle-vector) 5000)
(send *ri* :wait-interpolation))
The first line `(send *pr2* :reset-manip-pose)` changes the pose of euslisp kinematic model to the predefined pose called `reset-manip-pose`.
With calling this method, the actual robot does **NOT** move because this method only changes the states of the kinematic model. Instead you can see the current states of the kinematic model by `(objects (list *pr2*))`.
The kinematic model now looks like below:

The second line then send the current state of kinematic model to the actual robot.
The second argument `5000` allows the robot to take 5000 milliseconds to move to the pose. If the second argument is omitted, the default argument `3000` will be used.
After the second line, it will take 5 seconds until the robot ends to move, but the method call itself returns immediately.
The last method called in the last line is just for waiting for the robot until he ends to move to the specified pose.
Reach Object Demo
Reach Object Demo with PR2
# launch gazebo
roslaunch pr2_gazebo pr2_empty_world.launch
roslaunch pr2eus_tutorials spawn_objects.launch
# launch recognition
roslaunch jsk_pcl_ros hsi_color_filter.launch INPUT:=/wide_stereo/points2 h_min:=75 s_min:=50
# visualization
rviz -d `rospack find pr2eus_tutorials`/config/pr2_reach_object.rviz
# eus
roscd pr2eus_tutorials/euslisp
roseus reach-object.l
(pr2-setup)
(reach-object-demo)
Reach Object Demo with HRP2JSK
hrpsys_gazebo_tutorials is required.
(Currently, HRP2 model is not provided for open source projects.)
# launch gazebo
roslaunch hrpsys_gazebo_tutorials gazebo_hrp2jsk_no_controllers.launch
roslaunch pr2eus_tutorials spawn_objects.launch
# lanch hrpsys
rtmlaunch hrpsys_gazebo_tutorials hrp2jsk_hrpsys_bringup.launch KINEMATICS_MODE:=true
# launch recognition
roslaunch jsk_pcl_ros hsi_color_filter.launch INPUT:=/xtion/depth/points h_min:=75 s_min:=50
# visualization
rviz -d `rospack find pr2eus_tutorials`/config/hrp2jsk_reach_object.rviz
# eus
roscd pr2eus_tutorials/euslisp
roseus reach-object.l
(hrp2jsk-setup)
(reach-object-demo)
Could not convert RST to MD: No such file or directory - pandoc
Wiki Tutorials
Source Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
- launch/pr2_tabletop_grasp.launch
-
- run_rviz [default: false]
- manager [default: pr2_tabletop_object_detector_nodelet_manager]
- machine [default: c2]
- launch/pr2_tabletop.launch
-
- run_rviz [default: false]
- publish_objects_tf [default: true]
- launch_tracking [default: false]
- manager [default: pr2_tabletop_object_detector_nodelet_manager]
- machine [default: c2]
- load_machine [default: false]
- launch/tabletop_complete.launch
-
- flatten_table [default: false]
- model_set [default: REDUCED_MODEL_SET]
- tabletop_segmentation_points_input [default: narrow_stereo_textured/points2]
- launch/template_grasp.launch
-
- kinect_camera_name [default: openni]
- launch_object_manipulation [default: false]
- launch_realtime_tabletop [default: true]
- launch_objectdetection [default: false]
- launch/gazebo/pr2_template_grasp_sim.launch
-
- run_rviz [default: true]
- launch/gazebo/pr2_tabletop_sim.launch
-
- gui [default: true]
- run_rviz [default: true]
- publish_objects_tf [default: true]
- physics [default: ode]
- launch/gazebo/spawn_cylinder.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: cylinder]
- color [default: Green]
- length [default: 0.2]
- radius [default: 0.05]
- launch/gazebo/pr2_gazebo_empty.launch
-
- RUN_RVIZ [default: true]
- LAUNCH_NAVI [default: true]
- LAUNCH_BASE_CONTROLLER [default: true]
- launch/gazebo/pr2_tabletop_grasp_sim.launch
-
- run_rviz [default: true]
- launch/gazebo/pr2_interactive_manipulation_sim.launch
- launch/gazebo/spawn_box.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: box]
- color [default: Green]
- size_x [default: 0.5]
- size_y [default: 0.5]
- size_z [default: 0.5]
- launch/gazebo/spawn_model_in_database.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: table_model]
- type_name [default: table]
- launch/gazebo/spawn_objects.launch
- launch/gazebo/gazebo_image_relay.launch
- launch/gazebo/pr2_tabletop_scene.launch
-
- gui [default: true]
- physics [default: ode]
- launch/gazebo/pr2_gazebo_objects.launch
-
- run_rviz [default: true]
- table_x_pos [default: 0.0]
- launch/gazebo/pr2_gazebo_startup.launch
-
- launch_empty_map [default: true]
- launch_move_base [default: true]
- launch_move_tilt_scan [default: true]
- launch_moveit [default: false]
- launch_moveit_gui [default: false]
- launch_openni [default: true]
- apps/tabletop_grasp/tabletop_grasp.xml
Messages
Services
Plugins
Recent questions tagged pr2eus_tutorials at answers.ros.org
|
pr2eus_tutorials package from jsk_pr2eus repojsk_pr2eus pr2eus pr2eus_armnavigation pr2eus_impedance pr2eus_moveit pr2eus_openrave pr2eus_tutorials |
Package Summary
| Tags | No category tags. |
| Version | 0.3.14 |
| License | BSD |
| Build type | CATKIN |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/jsk-ros-pkg/jsk_pr2eus.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2019-04-27 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
Package Description
Additional Links
Maintainers
- Kei Okada
- Masaki Murooka
Authors
- Kei Okada
pr2eus_tutorials
This is a repository for tutorials of pr2eus
Installation
To play with this package, you can choose from two installation methods.
We assume the ROS environment is kinetic.
If you use ROS indigo distribution, please replace the word kinetic with indigo (or appropriate distributions).
Using pre-built package
- Follow the instruction of ROS installation
- Install the package
sudo apt install ros-kinetic-pr2eus-tutorials
- Load ROS Environment
source /opt/ros/kinetic/setup.bash`
Using source package
- Follow the instruction of ROS installation
- Setup catkin workspace
source /opt/ros/kinetic/setup.bash
sudo apt install python-catkin-tools python-wstool python-rosdep git
sudo rosdep init
rosdep update
# Create catkin workspace and download source repository
mkdir -p ~/ros/kinetic/src && cd ~/ros/kinetic/src
wstool init
wstool set jsk-ros-pkg/jsk_pr2eus --git https://github.com/jsk-ros-pkg/jsk_pr2eus.git -v master
wstool update
# Install dependencies for building the package
rosdep install --from-paths . -i -r -n -y
# Build the package
cd ~/ros/kinetic
catkin init
catkin build pr2eus_tutorials
- Load ROS Environment
source ~/ros/kinetic/devel/setup.bash`
Demos
PR2 Tabletop Object Detection
-
Startup nodes
First we need to start nodes used for this demo.
- Using a real robot
# on PR2 real robot
roslaunch pr2eus_tutorials pr2_tabletop.launch
You can locate a desk in front of the robot and put any objects on it.
- Using a simulator
you can set physics engine with roslaunch argument.
# on local machine
roslaunch pr2eus_tutorials pr2_tabletop_sim.launch physics:=dart
# It may take time to download materials for the first time
You can see the robot is spawned in a scene with a desk and some objects.
-
Run demo
Then we can now start the demo program for picking objects.
rosrun pr2eus_tutorials pr2-tabletop-object-grasp.l
After running the demo program above, you can see object bounding boxes in the `RViZ` window.
It means the robot now recognizes each objects as individual objects from camera sensor inputs.
You can click any object that you want the robot to pick up.

-
Step-by-step description of the demo program
In the bottom of the demo program
pr2-tabletop-object-grasp.l, you can see a main functiondemo.
(defun demo ()
(setq *grasping-object-p* nil)
(setq *arm* :rarm)
(setq *tfl* (instance ros::transform-listener :init))
(setq *tfb* (instance ros::transform-broadcaster :init))
(pr2-init)
(pr2-pregrasp-pose)
(wait-for-grasp-target))
The `(pr2-init)` method is just a initialization function for pr2 robot that instantiate two objects required for robot manipulation from euslisp:
- `*pr2*`: This object is a kinematic model for a PR2 robot. This object includes any fundamental functions for robot modeling such as inverse kinematics, dynamics, geometric constraints and so on. You can visualize this model by evaluating `(objects (list *pr2*))`.
- `*ri*`: This is an object that send a control signal to the actual robot from euslisp kinematics model and receive the result or actual states of the robot. `ri` is an abbreviation of `robot interface`.
Please note that `(pr2-init)` function is defined in `pr2-interface.l` in the `pr2eus` package.
In this demo program, the function is loaded in the top of the script:
(require :pr2-interface "package://pr2eus/pr2-interface.l")
After `(pr2-init)` is executed, the kinematic model looks like below:

After initialized the robot in euslisp, `(pr2-pregrasp-pose)` method is executed.
(defun pr2-pregrasp-pose ()
(send *pr2* :reset-manip-pose)
(send *ri* :angle-vector (send *pr2* :angle-vector) 5000)
(send *ri* :wait-interpolation))
The first line `(send *pr2* :reset-manip-pose)` changes the pose of euslisp kinematic model to the predefined pose called `reset-manip-pose`.
With calling this method, the actual robot does **NOT** move because this method only changes the states of the kinematic model. Instead you can see the current states of the kinematic model by `(objects (list *pr2*))`.
The kinematic model now looks like below:

The second line then send the current state of kinematic model to the actual robot.
The second argument `5000` allows the robot to take 5000 milliseconds to move to the pose. If the second argument is omitted, the default argument `3000` will be used.
After the second line, it will take 5 seconds until the robot ends to move, but the method call itself returns immediately.
The last method called in the last line is just for waiting for the robot until he ends to move to the specified pose.
Reach Object Demo
Reach Object Demo with PR2
# launch gazebo
roslaunch pr2_gazebo pr2_empty_world.launch
roslaunch pr2eus_tutorials spawn_objects.launch
# launch recognition
roslaunch jsk_pcl_ros hsi_color_filter.launch INPUT:=/wide_stereo/points2 h_min:=75 s_min:=50
# visualization
rviz -d `rospack find pr2eus_tutorials`/config/pr2_reach_object.rviz
# eus
roscd pr2eus_tutorials/euslisp
roseus reach-object.l
(pr2-setup)
(reach-object-demo)
Reach Object Demo with HRP2JSK
hrpsys_gazebo_tutorials is required.
(Currently, HRP2 model is not provided for open source projects.)
# launch gazebo
roslaunch hrpsys_gazebo_tutorials gazebo_hrp2jsk_no_controllers.launch
roslaunch pr2eus_tutorials spawn_objects.launch
# lanch hrpsys
rtmlaunch hrpsys_gazebo_tutorials hrp2jsk_hrpsys_bringup.launch KINEMATICS_MODE:=true
# launch recognition
roslaunch jsk_pcl_ros hsi_color_filter.launch INPUT:=/xtion/depth/points h_min:=75 s_min:=50
# visualization
rviz -d `rospack find pr2eus_tutorials`/config/hrp2jsk_reach_object.rviz
# eus
roscd pr2eus_tutorials/euslisp
roseus reach-object.l
(hrp2jsk-setup)
(reach-object-demo)
Could not convert RST to MD: No such file or directory - pandoc
Wiki Tutorials
Source Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
- launch/pr2_tabletop_grasp.launch
-
- run_rviz [default: false]
- manager [default: pr2_tabletop_object_detector_nodelet_manager]
- machine [default: c2]
- launch/pr2_tabletop.launch
-
- run_rviz [default: false]
- publish_objects_tf [default: true]
- launch_tracking [default: false]
- manager [default: pr2_tabletop_object_detector_nodelet_manager]
- machine [default: c2]
- load_machine [default: false]
- launch/tabletop_complete.launch
-
- flatten_table [default: false]
- model_set [default: REDUCED_MODEL_SET]
- tabletop_segmentation_points_input [default: narrow_stereo_textured/points2]
- launch/template_grasp.launch
-
- kinect_camera_name [default: openni]
- launch_object_manipulation [default: false]
- launch_realtime_tabletop [default: true]
- launch_objectdetection [default: false]
- launch/gazebo/pr2_template_grasp_sim.launch
-
- run_rviz [default: true]
- launch/gazebo/pr2_tabletop_sim.launch
-
- gui [default: true]
- run_rviz [default: true]
- publish_objects_tf [default: true]
- physics [default: ode]
- launch/gazebo/spawn_cylinder.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: cylinder]
- color [default: Green]
- length [default: 0.2]
- radius [default: 0.05]
- launch/gazebo/pr2_gazebo_empty.launch
-
- RUN_RVIZ [default: true]
- LAUNCH_NAVI [default: true]
- LAUNCH_BASE_CONTROLLER [default: true]
- launch/gazebo/pr2_tabletop_grasp_sim.launch
-
- run_rviz [default: true]
- launch/gazebo/pr2_interactive_manipulation_sim.launch
- launch/gazebo/spawn_box.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: box]
- color [default: Green]
- size_x [default: 0.5]
- size_y [default: 0.5]
- size_z [default: 0.5]
- launch/gazebo/spawn_model_in_database.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: table_model]
- type_name [default: table]
- launch/gazebo/spawn_objects.launch
- launch/gazebo/gazebo_image_relay.launch
- launch/gazebo/pr2_tabletop_scene.launch
-
- gui [default: true]
- physics [default: ode]
- launch/gazebo/pr2_gazebo_objects.launch
-
- run_rviz [default: true]
- table_x_pos [default: 0.0]
- launch/gazebo/pr2_gazebo_startup.launch
-
- launch_empty_map [default: true]
- launch_move_base [default: true]
- launch_move_tilt_scan [default: true]
- launch_moveit [default: false]
- launch_moveit_gui [default: false]
- launch_openni [default: true]
- apps/tabletop_grasp/tabletop_grasp.xml
Messages
Services
Plugins
Recent questions tagged pr2eus_tutorials at answers.ros.org
|
pr2eus_tutorials package from jsk_pr2eus repojsk_pr2eus pr2eus pr2eus_armnavigation pr2eus_impedance pr2eus_moveit pr2eus_openrave pr2eus_tutorials |
Package Summary
| Tags | No category tags. |
| Version | 0.3.14 |
| License | BSD |
| Build type | CATKIN |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/jsk-ros-pkg/jsk_pr2eus.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2019-04-27 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
Package Description
Additional Links
Maintainers
- Kei Okada
- Masaki Murooka
Authors
- Kei Okada
pr2eus_tutorials
This is a repository for tutorials of pr2eus
Installation
To play with this package, you can choose from two installation methods.
We assume the ROS environment is kinetic.
If you use ROS indigo distribution, please replace the word kinetic with indigo (or appropriate distributions).
Using pre-built package
- Follow the instruction of ROS installation
- Install the package
sudo apt install ros-kinetic-pr2eus-tutorials
- Load ROS Environment
source /opt/ros/kinetic/setup.bash`
Using source package
- Follow the instruction of ROS installation
- Setup catkin workspace
source /opt/ros/kinetic/setup.bash
sudo apt install python-catkin-tools python-wstool python-rosdep git
sudo rosdep init
rosdep update
# Create catkin workspace and download source repository
mkdir -p ~/ros/kinetic/src && cd ~/ros/kinetic/src
wstool init
wstool set jsk-ros-pkg/jsk_pr2eus --git https://github.com/jsk-ros-pkg/jsk_pr2eus.git -v master
wstool update
# Install dependencies for building the package
rosdep install --from-paths . -i -r -n -y
# Build the package
cd ~/ros/kinetic
catkin init
catkin build pr2eus_tutorials
- Load ROS Environment
source ~/ros/kinetic/devel/setup.bash`
Demos
PR2 Tabletop Object Detection
-
Startup nodes
First we need to start nodes used for this demo.
- Using a real robot
# on PR2 real robot
roslaunch pr2eus_tutorials pr2_tabletop.launch
You can locate a desk in front of the robot and put any objects on it.
- Using a simulator
you can set physics engine with roslaunch argument.
# on local machine
roslaunch pr2eus_tutorials pr2_tabletop_sim.launch physics:=dart
# It may take time to download materials for the first time
You can see the robot is spawned in a scene with a desk and some objects.
-
Run demo
Then we can now start the demo program for picking objects.
rosrun pr2eus_tutorials pr2-tabletop-object-grasp.l
After running the demo program above, you can see object bounding boxes in the `RViZ` window.
It means the robot now recognizes each objects as individual objects from camera sensor inputs.
You can click any object that you want the robot to pick up.

-
Step-by-step description of the demo program
In the bottom of the demo program
pr2-tabletop-object-grasp.l, you can see a main functiondemo.
(defun demo ()
(setq *grasping-object-p* nil)
(setq *arm* :rarm)
(setq *tfl* (instance ros::transform-listener :init))
(setq *tfb* (instance ros::transform-broadcaster :init))
(pr2-init)
(pr2-pregrasp-pose)
(wait-for-grasp-target))
The `(pr2-init)` method is just a initialization function for pr2 robot that instantiate two objects required for robot manipulation from euslisp:
- `*pr2*`: This object is a kinematic model for a PR2 robot. This object includes any fundamental functions for robot modeling such as inverse kinematics, dynamics, geometric constraints and so on. You can visualize this model by evaluating `(objects (list *pr2*))`.
- `*ri*`: This is an object that send a control signal to the actual robot from euslisp kinematics model and receive the result or actual states of the robot. `ri` is an abbreviation of `robot interface`.
Please note that `(pr2-init)` function is defined in `pr2-interface.l` in the `pr2eus` package.
In this demo program, the function is loaded in the top of the script:
(require :pr2-interface "package://pr2eus/pr2-interface.l")
After `(pr2-init)` is executed, the kinematic model looks like below:

After initialized the robot in euslisp, `(pr2-pregrasp-pose)` method is executed.
(defun pr2-pregrasp-pose ()
(send *pr2* :reset-manip-pose)
(send *ri* :angle-vector (send *pr2* :angle-vector) 5000)
(send *ri* :wait-interpolation))
The first line `(send *pr2* :reset-manip-pose)` changes the pose of euslisp kinematic model to the predefined pose called `reset-manip-pose`.
With calling this method, the actual robot does **NOT** move because this method only changes the states of the kinematic model. Instead you can see the current states of the kinematic model by `(objects (list *pr2*))`.
The kinematic model now looks like below:

The second line then send the current state of kinematic model to the actual robot.
The second argument `5000` allows the robot to take 5000 milliseconds to move to the pose. If the second argument is omitted, the default argument `3000` will be used.
After the second line, it will take 5 seconds until the robot ends to move, but the method call itself returns immediately.
The last method called in the last line is just for waiting for the robot until he ends to move to the specified pose.
Reach Object Demo
Reach Object Demo with PR2
# launch gazebo
roslaunch pr2_gazebo pr2_empty_world.launch
roslaunch pr2eus_tutorials spawn_objects.launch
# launch recognition
roslaunch jsk_pcl_ros hsi_color_filter.launch INPUT:=/wide_stereo/points2 h_min:=75 s_min:=50
# visualization
rviz -d `rospack find pr2eus_tutorials`/config/pr2_reach_object.rviz
# eus
roscd pr2eus_tutorials/euslisp
roseus reach-object.l
(pr2-setup)
(reach-object-demo)
Reach Object Demo with HRP2JSK
hrpsys_gazebo_tutorials is required.
(Currently, HRP2 model is not provided for open source projects.)
# launch gazebo
roslaunch hrpsys_gazebo_tutorials gazebo_hrp2jsk_no_controllers.launch
roslaunch pr2eus_tutorials spawn_objects.launch
# lanch hrpsys
rtmlaunch hrpsys_gazebo_tutorials hrp2jsk_hrpsys_bringup.launch KINEMATICS_MODE:=true
# launch recognition
roslaunch jsk_pcl_ros hsi_color_filter.launch INPUT:=/xtion/depth/points h_min:=75 s_min:=50
# visualization
rviz -d `rospack find pr2eus_tutorials`/config/hrp2jsk_reach_object.rviz
# eus
roscd pr2eus_tutorials/euslisp
roseus reach-object.l
(hrp2jsk-setup)
(reach-object-demo)
Could not convert RST to MD: No such file or directory - pandoc
Wiki Tutorials
Source Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
- launch/pr2_tabletop_grasp.launch
-
- run_rviz [default: false]
- manager [default: pr2_tabletop_object_detector_nodelet_manager]
- machine [default: c2]
- launch/pr2_tabletop.launch
-
- run_rviz [default: false]
- publish_objects_tf [default: true]
- launch_tracking [default: false]
- manager [default: pr2_tabletop_object_detector_nodelet_manager]
- machine [default: c2]
- load_machine [default: false]
- launch/tabletop_complete.launch
-
- flatten_table [default: false]
- model_set [default: REDUCED_MODEL_SET]
- tabletop_segmentation_points_input [default: narrow_stereo_textured/points2]
- launch/template_grasp.launch
-
- kinect_camera_name [default: openni]
- launch_object_manipulation [default: false]
- launch_realtime_tabletop [default: true]
- launch_objectdetection [default: false]
- launch/gazebo/pr2_template_grasp_sim.launch
-
- run_rviz [default: true]
- launch/gazebo/pr2_tabletop_sim.launch
-
- gui [default: true]
- run_rviz [default: true]
- publish_objects_tf [default: true]
- physics [default: ode]
- launch/gazebo/spawn_cylinder.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: cylinder]
- color [default: Green]
- length [default: 0.2]
- radius [default: 0.05]
- launch/gazebo/pr2_gazebo_empty.launch
-
- RUN_RVIZ [default: true]
- LAUNCH_NAVI [default: true]
- LAUNCH_BASE_CONTROLLER [default: true]
- launch/gazebo/pr2_tabletop_grasp_sim.launch
-
- run_rviz [default: true]
- launch/gazebo/pr2_interactive_manipulation_sim.launch
- launch/gazebo/spawn_box.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: box]
- color [default: Green]
- size_x [default: 0.5]
- size_y [default: 0.5]
- size_z [default: 0.5]
- launch/gazebo/spawn_model_in_database.launch
-
- pos_x [default: 0.0]
- pos_y [default: 0.0]
- pos_z [default: 0.0]
- rot_r [default: 0.0]
- rot_p [default: 0.0]
- rot_y [default: 0.0]
- model_name [default: table_model]
- type_name [default: table]
- launch/gazebo/spawn_objects.launch
- launch/gazebo/gazebo_image_relay.launch
- launch/gazebo/pr2_tabletop_scene.launch
-
- gui [default: true]
- physics [default: ode]
- launch/gazebo/pr2_gazebo_objects.launch
-
- run_rviz [default: true]
- table_x_pos [default: 0.0]
- launch/gazebo/pr2_gazebo_startup.launch
-
- launch_empty_map [default: true]
- launch_move_base [default: true]
- launch_move_tilt_scan [default: true]
- launch_moveit [default: false]
- launch_moveit_gui [default: false]
- launch_openni [default: true]
- apps/tabletop_grasp/tabletop_grasp.xml