Hey guys,
im trying to add some simple collision objects in Python to my planning scene in RViz to plan some trajectories with my UR5 Robot.
I tried something like
` scene = moveit_commander.PlanningSceneInterface()
p.pose.position.x = 0.4
p.pose.position.y = -0.2
p.pose.position.z = 0.3
scene.add_box("table", p, (0.5, 1.5, 0.6))
` but this didnt work. Unfortunately the MoveIt! Tutorial is missing this part for Python (only got it for C++). Can anyone help please?
Im running ROS Indigo on Ubuntu 14.04.
↧
MoveIt! Adding Collision Objects
↧
A manipulator with gripper for simulation
I am experimenting with high level manipulation tasks and wish to see the results in simulation. I would like to use Moveit for motion planning and observe the simulated results in Gazebo.
*I need some suggestions on manipulators with a simple gripper as its end-effector* (2 finger like PR2 will do just fine).
I tried to use a pr2 gripper with ur5 but I think I am not able to get the controllers right. Also the motion planning gets really weird in moveit after adding the gripper.
↧
↧
Change Planner in MoveIt Python
Hey guys, i want to change the default motion planner from OMPL in MoveIt to "PRMkConfigDefault".
But how can i change for example the planner for planning my group: `group = MoveGroupCommander("manipulator")` in Python? Thanks for your answers! Im running ROS Indigo on Ubuntu 14.04.
↧
Trajectory goes across the obstacle. Problems using PlanningSCeneMonitor and planning_scene topic?
Hello, :)
I'm trying to generate a trajectory to a scene which shows an object placed along the trajectory Generated without the Same Subject. I wrote because codes.
1) in the first code I Created the subject and added to the scene, publishing MESSAGE on "planning_scene" and using ApplyPlanningScene service:
// Advertise the required topic
ros::Publisher planning_scene_diff_publisher = node_handle.advertise("planning_scene", 1);
while (planning_scene_diff_publisher.getNumSubscribers() < 1)
{
ros::WallDuration sleep_t(0.5);
sleep_t.sleep();
}
// Service
ros::ServiceClient planning_scene_diff_client = node_handle.serviceClient("apply_planning_scene");
planning_scene_diff_client.waitForExistence();
// and send the diffs to the planning scene via a service call:
moveit_msgs::ApplyPlanningScene srv;
// Adding object
ROS_INFO("Creating BOX object in the scene:");
moveit_msgs::PlanningScene planning_scene_msg;
planning_scene_msg.is_diff = true;
planning_scene_msg.robot_state.is_diff = true;
moveit_msgs::CollisionObject collision_object;
collision_object.header.frame_id = "world";
collision_object.id = "box1"; //the id is used to identify the obj
shape_msgs::SolidPrimitive primitive;
primitive.type = primitive.BOX;
primitive.dimensions.resize(3);
primitive.dimensions[0] = 0.1;
primitive.dimensions[1] = 0.4;
primitive.dimensions[2] = 0.1;
geometry_msgs::Pose box_pose;
box_pose.orientation.w = 1.0;
box_pose.position.x = 0.2;
box_pose.position.y = 0.1;
box_pose.position.z = 1;
collision_object.primitives.push_back(primitive);
collision_object.primitive_poses.push_back(box_pose);
//add the collision object into the world
collision_object.operation = collision_object.ADD;
ROS_INFO("Add the object into the world");
planning_scene_msg.world.collision_objects.push_back(collision_object);
srv.request.scene = planning_scene_msg;
planning_scene_diff_client.call(srv);
planning_scene_diff_publisher.publish(planning_scene_msg);
sleep_time.sleep();
2) in another code that must acquire the scene and generate the trajectory whereas the presence of new object:
robot_model_loader::RobotModelLoader robot_model_loader("robot_description");
robot_model::RobotModelPtr robot_model = robot_model_loader.getModel();
planning_scene::PlanningScenePtr planning(new planning_scene::PlanningScene(robot_model));
ros::WallDuration sleep_time(10.0);
sleep_time.sleep();
boost::shared_ptr tf(new tf::TransformListener(ros::Duration(10.0)));
planning_scene_monitor::PlanningSceneMonitorPtr psm(new planning_scene_monitor::PlanningSceneMonitor("robot_description", tf));
psm->requestPlanningSceneState("get_planning_scene");
planning_scene_monitor::LockedPlanningSceneRW ps(psm);
ps->getCurrentStateNonConst().update();
planning_scene::PlanningScenePtr plans = ps->diff();
plans->decoupleParent();
planning_pipeline::PlanningPipelinePtr planning_pipeline(new planning_pipeline::PlanningPipeline(robot_model, node_handle, "planning_plugin", "request_adapters"));
[......···]
planning_pipeline->generatePlan(plans, req, res);
the problem is that when launch the node which publishes the topic "planning_scene" (having already launched rosrun move_group.launch) RViz the scene is changed, but the trajectory that is generated does not see the object that was added, but through it and then wrong. the procedure is correct or have I done something wrong?
thank you to those who will say,
↧
Trajectory goes across the obstacle. Problems using PlanningSCeneMonitor and planning_scene topic?
Hello, :)
I'm trying to generate a trajectory to a scene which shows an object placed along the trajectory Generated without the Same Subject. I wrote because codes.
1) in the first code I Created the subject and added to the scene, publishing MESSAGE on "planning_scene" and using ApplyPlanningScene service:
// Advertise the required topic
ros::Publisher planning_scene_diff_publisher = node_handle.advertise("planning_scene", 1);
while (planning_scene_diff_publisher.getNumSubscribers() < 1)
{
ros::WallDuration sleep_t(0.5);
sleep_t.sleep();
}
// Service
ros::ServiceClient planning_scene_diff_client = node_handle.serviceClient("apply_planning_scene");
planning_scene_diff_client.waitForExistence();
// and send the diffs to the planning scene via a service call:
moveit_msgs::ApplyPlanningScene srv;
// Adding object
ROS_INFO("Creating BOX object in the scene:");
moveit_msgs::PlanningScene planning_scene_msg;
planning_scene_msg.is_diff = true;
planning_scene_msg.robot_state.is_diff = true;
moveit_msgs::CollisionObject collision_object;
collision_object.header.frame_id = "world";
collision_object.id = "box1"; //the id is used to identify the obj
shape_msgs::SolidPrimitive primitive;
primitive.type = primitive.BOX;
primitive.dimensions.resize(3);
primitive.dimensions[0] = 0.1;
primitive.dimensions[1] = 0.4;
primitive.dimensions[2] = 0.1;
geometry_msgs::Pose box_pose;
box_pose.orientation.w = 1.0;
box_pose.position.x = 0.2;
box_pose.position.y = 0.1;
box_pose.position.z = 1;
collision_object.primitives.push_back(primitive);
collision_object.primitive_poses.push_back(box_pose);
//add the collision object into the world
collision_object.operation = collision_object.ADD;
ROS_INFO("Add the object into the world");
planning_scene_msg.world.collision_objects.push_back(collision_object);
srv.request.scene = planning_scene_msg;
planning_scene_diff_client.call(srv);
planning_scene_diff_publisher.publish(planning_scene_msg);
sleep_time.sleep();
2) in another code that must acquire the scene and generate the trajectory whereas the presence of new object:
robot_model_loader::RobotModelLoader robot_model_loader("robot_description");
robot_model::RobotModelPtr robot_model = robot_model_loader.getModel();
planning_scene::PlanningScenePtr planning(new planning_scene::PlanningScene(robot_model));
ros::WallDuration sleep_time(10.0);
sleep_time.sleep();
boost::shared_ptr tf(new tf::TransformListener(ros::Duration(10.0)));
planning_scene_monitor::PlanningSceneMonitorPtr psm(new planning_scene_monitor::PlanningSceneMonitor("robot_description", tf));
psm->requestPlanningSceneState("get_planning_scene");
planning_scene_monitor::LockedPlanningSceneRW ps(psm);
ps->getCurrentStateNonConst().update();
planning_scene::PlanningScenePtr plans = ps->diff();
plans->decoupleParent();
planning_pipeline::PlanningPipelinePtr planning_pipeline(new planning_pipeline::PlanningPipeline(robot_model, node_handle, "planning_plugin", "request_adapters"));
[......···]
planning_pipeline->generatePlan(plans, req, res);
the problem is that when launch the node which publishes the topic "planning_scene" (having already launched rosrun move_group.launch) RViz the scene is changed, but the trajectory that is generated does not see the object that was added, but through it and then wrong. the procedure is correct or have I done something wrong?
thank you to those who will say,
↧
↧
problem with MoveIt + joystick_control.launch
I've created a simple arm and I want to control it using a joystick.
Here's my launch file:
The error I'm getting is from joystick_control.launch is "[FATAL] Check if you started movegroups. Exiting." Here's the full stack trace:
$ roslaunch cougarbot_moveit_config joystick_control.launch
[ INFO] [1486692499.658150322]: Loading robot model 'cougarbot'...
[ INFO] [1486692499.659144317]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ WARN] [1486692499.660517007]: Could not identify parent group for end-effector 'hand'
[ INFO] [1486692500.876474349, 182.851000000]: Loading robot model 'cougarbot'...
[ INFO] [1486692500.877637693, 182.851000000]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ WARN] [1486692500.878770531, 182.851000000]: Could not identify parent group for end-effector 'hand'
[FATAL] [WallTime: 1486692501.117867] [0.000000] Check if you started movegroups. Exiting.
Traceback (most recent call last):
File "/opt/ros/indigo/lib/moveit_ros_visualization/moveit_joy.py", line 42, in
app = MoveitJoy()
File "/opt/ros/indigo/lib/python2.7/dist-packages/moveit_ros_visualization/moveitjoy_module.py", line 381, in __init__
self.updatePlanningGroup(0)
File "/opt/ros/indigo/lib/python2.7/dist-packages/moveit_ros_visualization/moveitjoy_module.py", line 405, in updatePlanningGroup
raise rospy.ROSInitException(msg)
rospy.exceptions.ROSInitException: Check if you started movegroups. Exiting.
↧
No completition of Cartesian Path using Moveit
Hello together,
I have a question regarding planning with a UR10 arm and Moveit. I try to compute a Cartesian Path around an object. And it frequently happens that the robot can not successfully follow the path until 100%. E.g. it stops after 59% etc. Looking on the control panel for the robot, I noticed that it could not execute the path completely because a joint limit is reached (-2 pi/2 pi). It is a little bit strange to me because normally Moveit should know that it will violate that limit and of course just setting the start state to something around 0 degree would do the job, but it starts for example sometimes with 250 degree for that special joint. Could you help me?
Thank you very much in advance!
Hannes
↧
Display RRT generated by MoveIt
Hey guys,
is there a way to display the RRT generated by MoveIt for motion planning in something like a picture/map/graphical output? I want to see the differences between the MoveIt planners and therefore it would be helpful to see the planned path, or generated roadmaps. Maybe some of you know a way or tool to do so.
Thanks for your ideas. Im running ROS indigo on Ubuntu 14.04.
↧
Define Startup State in MoveIt
Hey guys,
i want to declare the startup state of my UR5 Robot for motion planning in MoveIt (using a Python script). Every time i launch the demo file in RViz, the robot is lying flat on the ground (all joint states are zero). How can i define the start pose of the robot?
I already declared the following:
moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('ur_arm')
pub_pos = rospy.Publisher('arm_pos', Pose, queue_size=10)
scene = PlanningSceneInterface()
robot = RobotCommander()
group = MoveGroupCommander("manipulator")
Thanks for your support. Im running ROS Indigo on Ubuntu 14.04
↧
↧
moveit books
Hi!
I am new to moveit and i am trying to understand how to work with. Right now, i'm working with my custom robot and my objective is to plan paths by code. I followed the tutorials from moveit documentation, but that alone isnt helping too much in undersatanding and making my robot to move. Is there others tutorials/books that help understand better how to program with moveit librarys and such?
Regards
↧
Moveit move group interface catkin_make error
I am using the following tutorial link for learning moveit!
http://docs.ros.org/indigo/api/moveit_tutorials/html/doc/pr2_tutorials/planning/src/doc/move_group_interface_tutorial.html
When i build the directory using "catkin_make;, the get the following error.

I am also not able to understand the initial setup codes. Do i need to run them somewhere?
Kindly help me.
Regards
↧
moveit package with orocos component?
Is their moviet package which has got orocos component, so that i can make the robot move faster? Although i think it has not been released officially.
↧
cannot import moveit_commander
I am using ros kinetic on ubuntu 16.04 and when i try to import moveit_commander it gives this error:
Traceback (most recent call last):
File "", line 1, in
File "/opt/ros/kinetic/lib/python2.7/dist-packages/moveit_commander/__init__.py", line 3, in
from planning_scene_interface import *
File "/opt/ros/kinetic/lib/python2.7/dist-packages/moveit_commander/planning_scene_interface.py", line 48, in
import pyassimp
File "/usr/lib/python2.7/dist-packages/pyassimp/__init__.py", line 1, in
from .core import *
File "/usr/lib/python2.7/dist-packages/pyassimp/core.py", line 23, in
from . import structs
ImportError: cannot import name structs
↧
↧
how to open pr2 gripper with moveit_commander
Hi,
I cannot get move group to open gripper of pr2 eventhough I can successfully move the head torso and other parts of pr2 using the MoveGroupCommander. See the code below with two basic functions: move_head and open_gripper. This does not work when I try to open the gripper's hand.
Note that the gripper's hand closes when it is opened and I set all the joint values to zero. But I can't get it to open when the gripper's hands are closed.
#!/usr/bin/python
# coding: utf-8
import sys
import moveit_commander
import rospy
import roscpp
def home_head():
mgc = moveit_commander.MoveGroupCommander("head")
jv = mgc.get_current_joint_values()
jv[0] = 0.0
jv[1] = 0.5
mgc.set_joint_value_target(jv)
p = mgc.plan()
mgc.execute(p)
def open_right_hand():
mgc = moveit_commander.MoveGroupCommander("right_gripper")
jv = mgc.get_current_joint_values()
jv = [1.0, 1.0, 0.477, 0.477, 0.477, 0.477, 0.04]
mgc.set_joint_value_target(jv)
p = mgc.plan()
mgc.execute(p)
if __name__ == "__main__":
node_name = "ready_pr2"
moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node(node_name)
rospy.loginfo(node_name + ": is initialized")
rc = moveit_commander.RobotCommander()
rospy.loginfo("robot commander is initialized")
home_head()
rospy.loginfo("head homed")
open_right_hand()
rospy.loginfo("right_gripper opened")
moveit_commander.roscpp_shutdown()
↧
How to save OctoMap from MoveIt!
I am running Ubuntu 14.04 and ROS Indigo. I am currently using MoveIt! for generating an OctoMap from the robot sensors. How can I save that OctoMap? Or, alternatively, how can I access it in order to obtain occupancy information from specific points? I just know the type of the topic (moveit_msgs/PlanningScene), but I don't know how to work on the map.
I know that there is a similar question here in ROSanswers, I checked it, but that does not answer my question since the map is not generated via MoveIt!.
↧
Display MoveIt Collison Objects in Gazebo
How can i display collision objects i added to my MoveIt planning scene in Gazebo?
I added them like:
# publish a demo scene
scene = PlanningSceneInterface()
p = PoseStamped()
p.header.frame_id = robot.get_planning_frame()
# add a box
p.pose.position.x = 0.7
p.pose.position.y = -0.08
p.pose.position.z = 0.1
scene.add_box("box", p, (0.15, 0.15, 0.15))
They are all diplayed well in MoveIt but not in Gazebo right now. The robot is displayed in gazebo as well. Im running ROS Indigo on Ubuntu 14.04.
Thanks for your support!
↧
moveit_planning_execution fails
i have developed the moveit configuration file for ABB IRB4600 robot by following http://wiki.ros.org/Industrial/Tutorials/Create_a_MoveIt_Pkg_for_an_Industrial_Robot but i am not able to launch the moveit_planning_execution ..i am getting the following error.[Screenshot from 2017-03-07 05^%43^%49.png](/upfiles/14888943796401987.png)
↧
↧
Adding Collision Objects
Hello,
I am trying to add collision objects to the planning scene interface. However, the moveit planning seems to ignore the collision objects. I am passing a list of boxes as collision objects. Here is the code:
moveit_utils::MicoController srv_controller;
moveit::planning_interface::MoveGroup group("arm");
moveit::planning_interface::PlanningSceneInterface planning_scene_interface;
ROS_INFO("COLLISION SIZE\n");
ROS_INFO_STREAM(collision_objects.size());
sleep(2.0);
planning_scene_interface.addCollisionObjects(collision_objects);
group.setPlanningTime(10.0); //5 second maximum for collision computation
moveit::planning_interface::MoveGroup::Plan my_plan;
group.setStartState(*group.getCurrentState());
group.setPoseTarget(p_target);
ROS_INFO("[mico_moveit_cartesianpose_service.cpp] starting to plan...");
bool success = group.plan(my_plan);
if(success)
ROS_INFO("planning successful\n");
else
ROS_INFO("not successful :( \n");
Thank You.
↧
Tool0 URDF Modifications Break Path Planning
I've been trying to properly define my tool frame in ROS so that it matches the tool frame of the physical robot. Doing this requires changing the following lines of code in the URDF:
If I change the origin rpy in any way, it will no longer be able to find any valid states when I plan any orientation goal (even 1,0,0,0). Any help would be much appreciated.
Thanks,
Josh
↧
[moveIt! ]catkin_package() include dir 'include/eigen3' does not exist relative to
Error at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:296 (message): catkin_package() include dir 'include/eigen3' does not exist relative to '/home//moveIt_ws/src/moveit/moveit_kinematics'
environment: ROS indigo ubuntu14.04 moveIt! 0.7.8
build from source
fix package.xml and CMakeLists.txt in moveit/moveit_kinematics/
https://github.com/YuehChuan/moveit/commit/c3e16461d1541846bc7171d4bdf2167ba23e6922
here are my history
https://hackmd.io/s/BJAiRmxje#
↧