[ros-users] icra_navigation_gazebo -> test -> playing back bag files

Juracy Emanuel juracy.emanuel at gmail.com
Sun Oct 31 03:51:05 UTC 2010


A suggestion for beginners like me :

Considering that the blind corner world was launched :

$ source /home/emanuel/icra10_navigation_ros/setup.sh

$ export ROBOT=sim

$ roslaunch icra_navigation_gazebo blind_corner.launch

Using the code presented by Steve Cousins on his article : "ROS on the
PR2", IEEE RAM Sept. 2010 :

import rospy
from actionlib import SimpleActionClient
from pr2_controllers_msgs.msg import PointHeadAction, PointHeadGoal
from geometry_msgs.msg import Point

rospy.init_node('move_the_head')

client=SimpleActionClient('/head_traj_controller/point_head_action',
PointHeadAction)
client.wait_for_server()

g=PointHeadGoal()
g.target.header.frame_id='base_link'
g.target.point=Point(1.0,0.0,1.0)
g.min_duration=rospy.Duration(1)

client.send_goal(g)
client.wait_for_result()
------------------------------------------------------------------
Putting at the begin of the program above :

PKG = 'icra_navigation_gazebo'
import roslib
roslib.load_manifest(PKG)

------------------------------------------------------------

Running the program (./program.py) and then running :

$ source /home/emanuel/icra10_navigation_ros/setup.sh

$ rosrun icra_navigation_gazebo blind_corner_send_goal.py

-------------------------------------------------------------------------------------

Selecting in the View option of Gazebo :
wide_stereo_gazebo_x_stereo_camera_sensor

We can look ahead in the simulation during the navigation defined by :
 blind_corner_send_goal.py



More information about the ros-users mailing list