Closed hychiang-git closed 5 years ago
As I restarted my computer, the error [ERROR] [1550906931.876450425]: manipulator: Attempted to set projection evaluator with respect to va lue of joint 'shoulder_1_joint', but that joint is not known to the group 'manipulator'.
vanished.
Also, I fixed some warnings:
[ WARN] [1550906936.906830901]: Deprecation warning: Trajectory execution service is deprecated (was replaced by an action). Replace 'MoveGroupExecuteService' with 'MoveGroupExecuteTrajectoryAction' in move_group.launch Solution: Reference link: https://github.com/ros-planning/moveit/issues/201
[ WARN] [1550906925.205263961]: Skipping virtual joint 'fixed_base' because its child frame 'base_lin k' does not match the URDF frame 'world' Solution: https://github.com/ros-industrial/universal_robot/issues/347
However, the robot is still stuck at the position and does not move as it planned.
Here is my code
#include <moveit/move_group_interface/move_group.h> [255/419]
#include <moveit/planning_scene_interface/planning_scene_interface.h>
#include <moveit_msgs/DisplayRobotState.h>
#include <moveit_msgs/DisplayTrajectory.h>
#include <moveit_msgs/AttachedCollisionObject.h>
#include <moveit_msgs/CollisionObject.h>
int main(int argc, char **argv)
{
ros::init(argc, argv, "move_group_interface_tutorial");
ros::NodeHandle node_handle;
ros::AsyncSpinner spinner(1);
spinner.start();
/* This sleep is ONLY to allow Rviz to come up */
sleep(20.0);
// BEGIN_TUTORIAL
//
// Setup
// ^^^^^
//
// The :move_group_interface:`MoveGroup` class can be easily
// setup using just the name
// of the group you would like to control and plan for.
moveit::planning_interface::MoveGroup group("manipulator");
// We will use the :planning_scene_interface:`PlanningSceneInterface`
// class to deal directly with the world.
moveit::planning_interface::PlanningSceneInterface planning_scene_interface;
// (Optional) Create a publisher for visualizing plans in Rviz.
ros::Publisher display_publisher = node_handle.advertise<moveit_msgs::DisplayTrajectory>("/move_gro
up/display_planned_path", 1, true);
moveit_msgs::DisplayTrajectory display_trajectory;
// Getting Basic Information
// ^^^^^^^^^^^^^^^^^^^^^^^^^
//
// We can print the name of the reference frame for this robot.
ROS_INFO("Reference frame: %s", group.getPlanningFrame().c_str());
// We can also print the name of the end-effector link for this group.
ROS_INFO("Reference frame: %s", group.getEndEffectorLink().c_str());
// Planning to a Pose goal
// ^^^^^^^^^^^^^^^^^^^^^^^
// We can plan a motion for this group to a desired pose for the
// end-effector.
geometry_msgs::Pose target_pose1;
target_pose1.orientation = tf::createQuaternionMsgFromRollPitchYaw(0.0, 0.0, 0.0);
target_pose1.position.x = 0.10;
target_pose1.position.y = 0.25;
target_pose1.position.z = 0.50;
group.setPoseTarget(target_pose1);
// Now, we call the planner to compute the plan
// and visualize it.
// Note that we are just planning, not asking move_group
// to actually move the robot.
moveit::planning_interface::MoveGroup::Plan my_plan;
moveit::planning_interface::MoveItErrorCode success = group.plan(my_plan);
ROS_INFO("Visualizing plan 1 (pose goal) %s",success?"":"FAILED");
/* Sleep to give Rviz time to visualize the plan. */
sleep(5.0);
// Visualizing plans
// ^^^^^^^^^^^^^^^^^
// Now that we have a plan we can visualize it in Rviz. This is not
// necessary because the group.plan() call we made above did this
// automatically. But explicitly publishing plans is useful in cases that we
// want to visualize a previously created plan.
if (1)
{
ROS_INFO("Visualizing plan 1 (again)");
display_trajectory.trajectory_start = my_plan.start_state_;
display_trajectory.trajectory.push_back(my_plan.trajectory_);
display_publisher.publish(display_trajectory);
/* Sleep to give Rviz time to visualize the plan. */
sleep(5.0);
}
// Moving to a pose goal
// ^^^^^^^^^^^^^^^^^^^^^
//
// Moving to a pose goal is similar to the step above
// except we now use the move() function. Note that
// the pose goal we had set earlier is still active
// and so the robot will try to move to that goal. We will
// not use that function in this tutorial since it is
// a blocking function and requires a controller to be active
// and report success on execution of a trajectory.
/* Uncomment below line when working with a real robot*/
//group.move();
group.execute(my_plan);
ros::shutdown();
return 0;
}
Does anyone ever encounter this issue?
Thanks
It looks like there might be a possible change on naming convention of the UR5 joints in the new ROS/UR drivers. You can try to check the URDF file of the robot and see if the joint names are the same as in the program. Unfortunately, I'm unable to check that myself at the moment...
I fix the problem by modifying the ur5_move.launch. Here is the modified launch file.
<launch>
<!-- If sim=false, then robot_ip is required -->
<arg name="sim" default="true" />
<arg name="robot_ip" unless="$(arg sim)" />
<!-- By default, we are not in debug mode -->
<arg name="debug" default="false" />
<!-- Limited joint angles are used. Prevents complex robot configurations and makes the planner more efficient -->
<arg name="limited" default="true" />
<!-- Launch ur_gazebo -->
<include file="$(find ur_gazebo)/launch/ur5.launch">
<arg name="limited" default="true" />
</include>
<!-- Load UR5 URDF file - robot description file -->
<include file="$(find ur5_moveit_config)/launch/ur5_moveit_planning_execution.launch">
<arg name="sim" value="$(arg sim)" />
<arg name="limited" value="$(arg limited)" />
</include>
<!-- Launch the RViz visualizer -->
<include file="$(find ur5_moveit_config)/launch/moveit_rviz.launch">
<arg name="config" value="true" />
</include>
<!-- Optionally, you can launch a database to record all the activities -->
<include file="$(find ur5_moveit_config)/launch/default_warehouse_db.launch" />
<!-- Launch our own script -->
<node name="move_group_interface_tutorial" pkg="ur5_move" type="move_group_interface_tutorial" respawn="false" output="screen"></node>
</launch>
Hi All,
I modify
inf3480_move_robot.cpp
and ranroslaunch ur5_inf3480 ur5_launch_inf3480.launch
, but I got some warnings and errors as follow:Also, my robot stucked at the position:![image](https://user-images.githubusercontent.com/9960543/53283469-eabbdd00-3781-11e9-9f85-44b9af323b70.png)
Does anyone have the experimence of fixing these warnings and errors? Thanks