Robotics StackExchange | Archived questions

control multiple robots in gazebo via rviz

Hello I use fuerte in Ubuntu 12.04

and I want to control several turtlebots in gazebo via rviz. I follow the tutorial: answers.ros.org/question/41433/multiple-robots-simulation-and-navigation/ but have problems with the hacks

and replace line 36 to nodenamespaceP = new ParamTstd::string("robotNamespace","",0)

line 36 is

GazeboRosCreate::~GazeboRosCreate() { rosnode->shutdown(); this->spinnerthread->join(); delete this->spinnerthread; delete [] wheelspeed; delete rosnode; }

and then the problem that rosmake does not work (because ROS_NOBUILD), --unmark-installed and --build-everything, too. because it is in / opt / ros / fuerte / stacks (he can not create "build")

with a robot, it worked, after I try it with the instructions I got the error

goal.targetpose.header.stamp = rospy.Time.now() File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/rostime.py", line 149, in now return getrostime() File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/rostime.py", line 203, in getrostime raise rospy.exceptions.ROSInitException("time is not initialized. Have you called initnode()?") rospy.exceptions.ROSInitException: time is not initialized. Have you called init_node()?

can any one help

(I have no real Turtlebot) control robot via

#!/usr/bin/env python
import roslib; roslib.load_manifest('simple_navigation_goals')
import rospy
import actionlib
from move_base_msgs.msg import MoveBaseGoal, MoveBaseAction

if __name__ == "__main__":
    rospy.init_node("simple_navigation_goals")
    client = actionlib.SimpleActionClient( 'move_base', MoveBaseAction )
    client.wait_for_server()

    goal = MoveBaseGoal()
#   goal.target_pose.header.frame_id = "/base_link"
    goal.target_pose.header.frame_id = "/map"
    goal.target_pose.header.stamp = rospy.Time.now()
    goal.target_pose.pose.position.x = 1
    goal.target_pose.pose.position.y = 1
goal.target_pose.pose.orientation.w = 1.0

    client.send_goal(goal)
#   client.wait_for_result(rospy.Duration.from_sec(5.0))

    client.wait_for_result()

print client.get_state() 

Asked by Flo89 on 2013-10-16 07:19:57 UTC

Comments

I would love to see this resolved.

Asked by Abdul Mannan on 2016-10-26 02:25:42 UTC

Answers