Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 1441 articles
Browse latest View live

MoveIt problem. error: Trajectory message contains waypoints that are not strictly increasing in time

$
0
0
Hello, I'm trying to use MoveIt's group interface to execute a Cartesian path. When I try to execute the plan with the trajectory, I get the error: Trajectory message contains waypoints that are not strictly increasing in time. I've even tried to fix it based on some code that someone else had luck with, but it doesn't work for me. Does anyone have any suggestions? Thanks! Here is my code: // Compute the trajectory of my waypoints moveit_msgs::RobotTrajectory trajectory; double fraction = move_group.computeCartesianPath(waypoints, 0.01, 0.0, trajectory); // All of the JointTrajectoryPoints in the trajectory have time_from_start = 0.00, which is the reason why the error gets thrown. The below steps are my attempt to fix the error, but they do nothing for me. // First create a RobotTrajectory object robot_trajectory::RobotTrajectory rt(move_group.getCurrentState()->getRobotModel(), "arm"); // Second get a RobotTrajectory from trajectory rt.setRobotTrajectoryMsg(*move_group.getCurrentState(), trajectory); // Thrid create a IterativeParabolicTimeParameterization object trajectory_processing::IterativeParabolicTimeParameterization iptp; // Fourth compute computeTimeStamps bool success = iptp.computeTimeStamps(rt); ROS_INFO("Computed time stamp %s",success?"SUCCEDED":"FAILED"); // Get RobotTrajectory_msg from RobotTrajectory rt.getRobotTrajectoryMsg(trajectory); plan.trajectory_ = trajectory; ROS_INFO("Visualizing plan 4 (cartesian path) (%.2f%% acheived)",fraction * 100.0); if (success) { move_group.execute(plan); return true; }else{ ROS_WARN("no success"); return false; }

Pose Goal as Motion Plan Request

$
0
0
I have gone through the moveit_msgs and I have seen the Motion Plan Request. My question is, how can we specify a pose goal in the motion plan request? Is it possible to set a simple pose goal as shown in the moveit tutorials? Also in the motion plan request message, there is a goal_constraints which further contains position_constraints. What is this constraint and where could it be used? Thank you!

Discrepancy between OctoMap visualization and actual OctoMap in MoveIt!

$
0
0
The robotic platform I use is rail-mounted and has a manipulator 6-DOF robotic arm). I am using MoveIt! to control the arm. The rail the robot is mounted on is added as a collision object. I want to add the rest of the environment (a large steel tank) as an OctoMap, since I want to perform raycasting. I publish the OctoMap using the octomap_server_node from the octomap_server package. I republish it to the monitored planning scene using the following snippet: class OctoHandler(): mapMsg = None def __init__(self): rospy.init_node('moveit_octomap_handler') rospy.Subscriber('octomap_full', Octomap, self.cb, queue_size=1) pub = rospy.Publisher('move_group/monitored_planning_scene', PlanningScene, queue_size=1) r = rospy.Rate(0.25) while(not rospy.is_shutdown()): if(self.mapMsg is not None): pub.publish(self.mapMsg) else: pass r.sleep() def cb(self, msg): psw = PlanningSceneWorld() psw.octomap.header.stamp = rospy.Time.now() psw.octomap.header.frame_id = 'map' psw.octomap.octomap = msg psw.octomap.origin.position.x = 0 psw.octomap.origin.orientation.w = 1 ps = PlanningScene() ps.world = psw ps.is_diff = True self.mapMsg = ps The OctoMap is added to the planning scene and visible in Rviz. However, instead of the in the global map frame, the visualization is projected in the start_rail frame, the root of my planning scene: The planning scene seems correct though, as can be deduced from the image below. The base of the arm is not colliding according to MoveIt!, while the end effector is (in a location where I actually added the environment). ![image description](https://snag.gy/EnNU1C.jpg) This might be a bug in the MoveIt! Rviz plug-in. For example a missing transform somewhere [here](https://github.com/ros-planning/moveit/blob/e97038d476c4e45817e80f6ec5e58d5840ccf004/moveit_ros/visualization/rviz_plugin_render_tools/src/octomap_render.cpp#L204). I might also just be doing something wrong. ;) Anything that points me in the right direction is greatly appreciated! A workaround might be to include my map frame in my SRDF, to extend the root of the planning scene to the global frame. This is not very elegant, though.

MoveIt 6 DOF arm: moving a box around a planar surface

$
0
0
Hello ROS Users, I have a 6 DOF robot arm. This robot arm is holding an object, say a cube. Ultimately, I would like to specify an (x, y, z) position for the cube to reach on a planar surface, while ensuring the cube is perpendicular to the surface. I would like the cube to move around on this planar surface, for 2 scenarios. 1. Pick up the cube and reposition it such that the attached cube is flat against the planar surface 2. Once the attached cube is on the planar surface, slide the cube in a straight line What would be the best way to do motion planning with MoveIt! for this 6 DOF robot arm with attached cube? I know how to do motion planning for reaching a specified target pose (position + orientation), but the orientation for the cube is problematic; I do not care what the yaw angle for the box ends up being (z-axis perpendicular to planar surface). Edit: Was able to get an orientation constraint to finally work, took some time to figure out what quaternion and absolute axis tolerances should be set to. Is the orientation constraint only being satisfied for the final position in the trajectory? I am asking because the robot arm is doing a lot of strange maneuvers to reach the goal position, which is not what I am looking for. Also, some positions are not able to be planned to unless the robot arm is moved closer to the goal position. Thanks

Define end-effector pose by point and vector

$
0
0
Hi all, I am using a UR10 with Moveit! for motion planning (move group interface C++). I want to align my end-effector with a vector in space. I read a lot about quaternions and rotation in 3d space, but at the moment I struggle to find out the best way to do this. I have a given point (x,y,z) and a given vector for orientation (a,b,c), how can I set a target pose for the end-effector? Tried to use a geometry_msg but it needs a point and a quaternion. Also tried to calculate a quaternion between the current vector and the goal vector using cross product etc. but therefore I would need the vector of the current pose and I struggled to find it out -.- Does anybody know a clean solution for my problem? Thank you very much in advance! Hannes

Easy Access to robot poses created using the MoveIt! Setup Assistant

$
0
0
Consider that I have set 3 different poses for my robot with different names and different joint values. Now while using the `MoveIt Setup Assistant` I can add the 3 poses under the tab `Robot Poses`and click the button `MoveIt!` at the bottom of the Setup Assistant screen to see the robot change the poses. I want to know how I can easily switch between the 3 poses when I am using the `move_group_interface` and the `RViz plugin`.

Position ONLY IK with seed value using MoveIt

$
0
0
Hi, I am using moveit for IK calculation of my Baxter Robot. I want to calculate the joint angles for a given position (excluding orientation) of End-Effector. Following is code snippet: import moveit_commander group = moveit_commander.MoveGroupCommander("left_arm") group.set_position_target([x, y, z]) plan = group.plan() The variable `plan` contains complete trajectory for moving the robot arm from current position to target position. BUT I just want the joint angles for target position, so I select the last element of this trajectory to get the joint angle. There can be many solutions for a given position for Baxter arm, hence I want to provide an initial estimate of the joint angles as a seed value. So that moveit can search for IK solution nearest to the seed value. Below are my questions: 1. How to set seed value in moveit for IK calculation? 2. How to perform IK for position only input (better suggestion compared to my approach) ? - Thanks

Unable to connect to move_group action server 'pickup' within allotted time

$
0
0
Dear Ros Users, I am trying to use moveIt! but, when launching RViz, this is the error that I get: Unable to connect to move_group action server 'pickup' within allotted time (30s) Actually, "pickup" is not in my list, as stated when move_group is launched: Loading 'move_group/MoveGroupCartesianPathService'... Loading 'move_group/MoveGroupExecuteService'... Loading 'move_group/MoveGroupKinematicsService'... Loading 'move_group/MoveGroupMoveAction'... Loading 'move_group/MoveGroupPlanService'... Loading 'move_group/MoveGroupQueryPlannersService'... Loading 'move_group/MoveGroupStateValidationService'... Loading 'move_group/MoveGroupGetPlanningSceneService'... Loading 'move_group/ApplyPlanningSceneService'... Loading 'move_group/ClearOctomapService'... ******************************************************** * MoveGroup using: * - CartesianPathService * - ExecutePathService * - KinematicsService * - MoveAction * - MotionPlanService * - QueryPlannersService * - StateValidationService * - GetPlanningSceneService * - ApplyPlanningSceneService * - ClearOctomapService ******************************************************** [ INFO] [1485960704.893790868]: MoveGroup context using planning plugin ompl_interface/OMPLPlanner [ INFO] [1485960704.893821482]: MoveGroup context initialization complete Thank you for your support!

MoveIt Cartesian Path with Constraints

$
0
0
Hello, I am having trouble getting my function call to group.computeCartesianPath() to follow my previously set constraints with group.setPathConstraints(). Since my path constraint is an orientation constraint, what should I enter for the waypoints Pose orientation? I am trying to move my arm 0.05 m in a line. I checked using group.setPositionTarget() with my orientation constraint, to see if the starting position, goal position, and multiple positions in between were valid; they were. When I try setting a waypoint to the goal position (0.05m further in a line), group.computeCartesianPath() fails when I set waypoints.orientation.w = 1; follows 0.00% of trajectory. However, when I set the waypoints.orientation to the starting position's waypoint, it works by following the orientation throughout the trajectory; follows 100.00% of trajectory. This would be okay, but my 6 DOF arm is limited in reaching positions by its orientation. Following the line 0.05 m is as far as it can go with the same orientation, but with a changing orientiation, it should be able to follow a line for 0.2 m. From what I am observing, group.computeCartesianPath() is ignoring the orientation constraint. Any help would be appreciated, Thanks

Align x-axis of end effector with vector in space

$
0
0
Hi all, I really need your help. I have tried now for a few days to align my end effector with a simple 3d vector in space. Thats's a quite simple task: given position = x,y,z and given orientation vector = a,b,c but I can't find a function in moveit! to do so. I dont know how to form the geometry_msgs::Pose by position (of course) and **quaternion.** I tried everything like: - getRPY from current pose - convert to "vector" (which is of course not equal and simple, lose roll) - calculate perpendicular vector (cross product) and angle (dot product) between the two vectors above (current+given goal orientation vector) - from this calculate the quaternion by constructor tf::quaternion(perpendicular vector, angle) That couldn't be the truth, I must have missed something... please advise. I am using ROS Indigo, Ubuntu 14.04LTS, Moveit! Thank you very much in advance! Hannes

Complete MoveIt! Pick and Place example? (ideally with Gazebo integration)

$
0
0
There is [this nice video](https://www.youtube.com/watch?v=Jk_s98U5ob8) of a (real) PR2 performing Pick&Place using ORK and MoveIt!. Is the demonstrated (launch file) setup available somewhere? I´d like to take a look at it to see the component interaction between perception, planning and execution. If not, are there any other examples available that demonstrate MoveIt! based pick and place, ideally with the option of running them in Gazebo simulation?

Fail: ABORTED: No motion plan found. No execution attempted

$
0
0
I have used moveit api but with function "group.setPoseTarget(pose1)" it give " Fail: ABORTED: No motion plan found. No execution attempted" and at terminal of rviz it give [ INFO] [1469775045.492605776]: LBKPIECE1: Created 1 (1 start + 0 goal) states in 1 cells (1 start (1 on boundary) + 0 goal (0 on boundary)) [ INFO] [1469775045.492659516]: No solution found after 5.050528 seconds [ INFO] [1469775045.528370905]: Unable to solve the planning problem [ INFO] [1469775050.530937767]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline. [ INFO] [1469775051.139609983]: Planning attempt 1 of at most 1 [ INFO] [1469775051.169520219]: LBKPIECE1: Starting planning with 1 states already in datastructure [ERROR] [1469775056.175594376]: LBKPIECE1: Unable to sample any valid states for goal tree [ INFO] [1469775056.175806507]: LBKPIECE1: Created 1 (1 start + 0 goal) states in 1 cells (1 start (1 on boundary) + 0 goal (0 on boundary)) [ INFO] [1469775056.175905203]: No solution found after 5.006600 seconds [ INFO] [1469775056.185580711]: Unable to solve the planning problem can any one tell me how to solve this problem?

Moveit Tutorials step: Move_group interface Tutorial

$
0
0
I can not go forward in this step of the tutorial, after opening Rviz the tutorial says to insert the command: *roslaunch moveit_tutorials move_group_interface_tutorial.launch* Then the following message appears: *[Move_group_interface_tutorial.launch] is not a launch file in package [moveit_tutorials] nor is [moveit_tutorials] a launch file name The traceback for the exception was written to the log file* Can anybody help me?

problem with MoveIt + joystick_control.launch

$
0
0
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.

End-effector jumping about erratically with MoveIt

$
0
0
Hi, I'm using MoveIt to control my arm. It has < 6 DoF so I need to tick "Allow Approximate IK Solutions" in order to drag the end effector in `moveit_rviz`. However, I am running into two problems which I think may be linked: (1) When manipulating the end effector in `moveit_rviz` by dragging the ball about, if I am not very careful the ball will become detached from the end effector and the arm will suddenly start jumping around all over the place to random poses. If I let go of the mouse it will stop moving, and I can regain control from the new position. (2) When manipulating the end effector using `moveit_joy` with `moveit_rviz` running, if I move the end effector using the joystick, I can see that it is occasionally flickering between its new position and (what looks like) the original 'home' position. It's kind of like it's being driven by two different things. On top of this, I notice problem (1) still occuring, where I occasionally lose control of the end effector as it starts jumping around between random poses. Often the only way I can stop it from jumping around is to kill `moveit_joy` altogether. Does anybody know what could be the problem here please? Thanks.

universal_robot driver for ROS Kinetic

$
0
0
Currently I am working on some movement planning projects with UR3, and one of the ideas is to use Raspberry Pi 3 model B as a computing center for robot's motion planning. The issue is that Ubuntu development team officially supports only Ubuntu 16.04 Xenial version for RPi3, and even Ubunty Trusty image for Raspberry Pi **2** is no longer maintained. As we tested, there is no problem to install Ubuntu Xenial with Kinetic on RPi3, but the problem is that officially universal driver is not compatible with Kinetic, so it won't work. 1) Is there plans to develop ROS Kinetic version for driver, with compatibility with moveit planner? 2) Maybe there are other solutions for computing boards with Trusty + Indigo, do you know some? Thanks in advance.

Move_group_interface_tutorial: orientation vs. position

$
0
0
Hi! I am learning how to plan my robot arm with moveit following pr2_tutorials: http://docs.ros.org/indigo/api/pr2_moveit_tutorials/html/planning/src/doc/move_group_interface_tutorial.html What i dont understand is: 1 - what it's the diference between orientation and position? 2 - I try to move my end effector with only position x,y,z and it didnt work, why? 3 - Right now i always plan with joint space goal and read the positions to then plan with pose goal or path. Is this the way, or it is a better method to plan with coordinates? Can you help me clarify my doubts? Thanks

moveit cant find GLEW

$
0
0
Attempting a build from source on a debian jessie installation, have rosdep all issues, yet it fails to build with an ..... CMake Error at /usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 {_FPHSA_FAILURE_MESSAGE} Could not find GLEW (missing: GLEW_INCLUDE_DIR GLEW_LIBRARY) Is this an env variable that should be set? ANY pointers would be helpful , thank you.

libfcl-0.5-dev cant resolve depends

$
0
0
Building moveit from source on a debian jessie install on a hP Xeon Proliant server. rosdep Unable to locate package libfcl-0.5-dev Couldn't find any package by regex 'libfcl-0.5.dev' my last issue was because my `sources.list` was messed, up and I did a `apt-get update` and solve it, if this has any bearing.... Thanks for all the assistance. --- Edit: rosdep install --from-paths . --ignore-src --rosdistro indigo executing command [sudo -H apt-get install libfcl-0.5-dev] Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libfcl-0.5-dev E: Couldn't find any package by regex 'libfcl-0.5-dev' ERROR: the following rosdeps failed to install apt: command [sudo -H apt-get install libfcl-0.5-dev] failed Indigo Branch I think the stray period was my fingers....sorry for the confusion..... How do I verify amd64 or i386? If I remember correctly, i386. --- Edit: Here is: $ uname -a Linux hpdeb 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1 (2016-12-30) i686 GNU/Linux and: $ file /sbin/init /sbin/init: symbolic link to /lib/systemd/systemd

Orientation constrained Inverse Kinematics in Moveit is not working on Baxter

$
0
0
Moving from point A to point B, I want Baxter arm to stay approximately vertically downward throughout the trajectory. The trajectory ends near to the workspace limit, hence arm must be stretched in order to reach point B. Below is the constraint: - The orientation need not be constant throughout the trajectory. In fact, it can change within specified limits Before performing the experiment, I moved the arm from point A to B within desired orientation and recorded this trajectory (end-effector position and orientation) in CSV file. Later, I used this CSV file to calculate orientation limits. This is how I calculate orientation limits: import numpy as np from numpy.linalg import norm from tf.transformations import euler_from_quaternion # ee_data (numpy 2D array) is end-effector # trajectory consisting of position and orientation. # q_traj is quaternion trajectory of end-effector q_traj = ee_data[:, 4:8] q_mean = q_traj.mean(axis=0) # normalize for making it perfect quaternion q_mean_norm = q_mean/norm(q_mean) # convert each quaternion into euler eu_traj = np.apply_along_axis(euler_from_quaternion, axis=1, arr=q_traj) eu_std = eu_traj.std(axis=0) This is how limits have been assigned: from geometry_msgs.msg import Quaternion from moveit_msgs.msg import Constraints, OrientationConstraint orientation_constraint = OrientationConstraint() orientation_constraint.orientation = Quaternion(*q_mean_norm) orientation_constraint.absolute_x_axis_tolerance = eu_std[0] orientation_constraint.absolute_y_axis_tolerance = eu_std[1] orientation_constraint.absolute_z_axis_tolerance = eu_std[2] orientation_constraint.weight = 0.8 orientation_constraint.link_name = group.get_end_effector_link() orientation_constraint.header.frame_id = group.get_planning_frame() constraint = Constraints() constraint.orientation_constraints.append(orientation_constraint) group.set_path_constraints(constraint) The robot is already kept at point A, so I only need to set the target position. Please see below: # point B is last point of recorded trajectory postion_target = ee_data[-1, 1:4].tolist() group.set_position_target(postion_target) plan = group.plan() if plan.joint_trajectory.points: print 'Moving arm...' group.go(wait=True) print 'Reached target pose' else: print 'ERROR: No IK solution found' The IK solver is not able to return any solution and I always get `ERROR: No IK solution found` error in terminal. I printed orientation_constraint variable and it looked fine. print orientation_constraint header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: /base orientation: x: 0.0912257059583 y: 0.915770149186 z: -0.376106400769 w: 0.107642369597 link_name: left_gripper absolute_x_axis_tolerance: 0.238215788631 absolute_y_axis_tolerance: 0.277075213625 absolute_z_axis_tolerance: 0.753014745451 weight: 0.8
Viewing all 1441 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>