ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Robot Nr.5's profile - activity

2021-07-31 13:50:14 -0500 received badge  Famous Question (source)
2021-02-05 04:48:00 -0500 received badge  Notable Question (source)
2020-03-27 14:07:45 -0500 received badge  Taxonomist
2018-05-25 19:54:25 -0500 received badge  Famous Question (source)
2018-01-31 10:56:40 -0500 received badge  Popular Question (source)
2017-09-01 04:29:36 -0500 received badge  Notable Question (source)
2017-08-07 08:09:38 -0500 received badge  Popular Question (source)
2017-08-04 09:26:39 -0500 asked a question RViz move Interactive Marker to other joint

RViz move Interactive Marker to other joint Hey there, I am new to RViz and wondering if it's possible to move the inter

2017-08-04 04:16:06 -0500 asked a question RViz Motion Planner GUI explanation?

RViz Motion Planner GUI explanation? Is there a documentation of the RViz GUI where it's explained what the parameters d

2017-08-03 13:49:30 -0500 received badge  Popular Question (source)
2017-08-03 10:26:26 -0500 received badge  Supporter (source)
2017-08-03 10:26:21 -0500 marked best answer MoveIt Tutorial rviz does not start

Hi guys, I try to move the robot Sawyer from rethinkrobotics to a given point. My base program for this is here. Because it doesn't work well just typing in coordinates I want to try to simulate the movement or at least read out the joint positions with rviz. Therefor I completed the MoveIt tutorial from rethinkrobotics and now I try to apply the python tutorial to reach my goal.

Right now I am trying to get the first lines of code from the given example working (just to "printing robot state") but rviz won't start. The output in the console seems to be like it should be, the action server is up and running and rviz works fine if I start it manually by

$ roslaunch sawyer_moveit_config sawyer_moveit.launch

So I leave that console window open and start the example which should start rviz, but nothing happens. Any ideas?

Here's the part of the code example I want to work (cleaned it a bit):

#!/usr/bin/env python

################### CORRECT STARTUP ###################
# $ rosrun file.py joint_states:=/robot/joint_states
#######################################################
#######################################################

## BEGIN_SUB_TUTORIAL imports
##
## To use the python interface to move_group, import the moveit_commander
## module.  We also import rospy and some messages that we will use.
import sys
import copy
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
## END_SUB_TUTORIAL

from std_msgs.msg import String

def move_group_python_interface_tutorial():
## BEGIN_TUTORIAL
##
## Setup
## ^^^^^
## CALL_SUB_TUTORIAL imports
##
## First initialize moveit_commander and rospy.
print "============ Starting tutorial setup"
moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('move_group_python_interface_tutorial',
              anonymous=True)

## Instantiate a RobotCommander object.  This object is an interface to
## the robot as a whole.
robot = moveit_commander.RobotCommander()

## Instantiate a PlanningSceneInterface object.  This object is an interface
## to the world surrounding the robot.
scene = moveit_commander.PlanningSceneInterface()

## Instantiate a MoveGroupCommander object.  This object is an interface
## to one group of joints.  In this case the group is the joints in the left
## arm.  This interface can be used to plan and execute motions on the left
## arm.
group = moveit_commander.MoveGroupCommander("right_arm")

## We create this DisplayTrajectory publisher which is used below to publish
## trajectories for RVIZ to visualize.
display_trajectory_publisher = rospy.Publisher(
                                  '/move_group/display_planned_path',
                                  moveit_msgs.msg.DisplayTrajectory,
                                  queue_size=20)

## Wait for RVIZ to initialize. This sleep is ONLY to allow Rviz to come up.
print "============ Waiting for RVIZ..."
rospy.sleep(10)
print "============ Starting tutorial "

## Getting Basic Information
## ^^^^^^^^^^^^^^^^^^^^^^^^^
##
## We can get the name of the reference frame for this robot
print "============ Reference frame: %s" % group.get_planning_frame()

## We can also print the name of the end-effector link for this group
print "============ Reference frame: %s" % group.get_end_effector_link()

## We can get a list of all the groups in the robot
print "============ Robot Groups:"
print robot.get_group_names()

## Sometimes for debugging it is useful to print the entire state of the
## robot.
print "============ Printing robot state"
print robot.get_current_state()
print "============"

## When finished shut down moveit_commander.
moveit_commander.roscpp_shutdown()

## END_TUTORIAL

print "============ STOPPING"


if __name__=='__main__':
try:
  move_group_python_interface_tutorial()
except rospy.ROSInterruptException:
  pass
2017-08-03 10:26:21 -0500 received badge  Scholar (source)
2017-08-03 10:25:59 -0500 commented answer MoveIt Tutorial rviz does not start

That means it is not intended to start RViz automatically from the code but manually by yourself?! What a bummer.

2017-08-03 09:45:19 -0500 commented question MoveIt Tutorial rviz does not start

I am new to this stuff and just copied the example. That there is no explicit call for RViz is clear to me, but with my

2017-08-03 09:31:05 -0500 asked a question MoveIt Tutorial rviz does not start

MoveIt Tutorial rviz does not start Hi guys, I try to move the robot Sawyer from rethinkrobotics to a given point. My ba