Hi, I've followed the MoveIT tutorials with the PR2 robot on motion planning (move_group) (http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/pr2_tutorials/planning/src/doc/move_group_interface_tutorial.html) and it worked so far that I could see the robot move its arm in RVIZ through MoveIT.
Now, I wanted to try this out on my robot so what I did was I created a new package for my robot through the MoveIT setup assistant with the URDF file that I have. After that I tried to take some minimal amount of code from the tutorial into my own arm.cpp file like this:
#include
#include
#include
#include
#include
#include
#include
int main(int argc, char **argv)
{
ros::init(argc, argv, "arm");
ros::NodeHandle node_handle;
ros::AsyncSpinner spinner(1);
spinner.start();
static const sd::string PLANNING_GROUP = "arm";
moveit::planning_interface::MoveGroupInterface move_group(PLANNING_GROUP);
moveit::planning_interface::PlanningSceneInterface planning_scene_interface;
const robot_state::JointModelGroup *joint_model_group = move_group.getCurrentState()->getJointModelGroup(PLANNING_GROUP);
//We gebruiken rviz voor de visualisatie
namespace rvt = rviz_visual_tools;
moveit_visual_tools::MoveItVisualTools visual_tools("odom_combined");
visual_tools.deleteAllMarkers();
visual_tools.loadRemoteControl();
//Eigen::Affine3d text_pose = Eigen::Affine3d::Identity();
//text_pose.translation().z() = 1.75; // above head of PR2
//visual_tools.publishText(text_pose, "Arm", rvt::WHITE, rvt::XLARGE);
visual_tools.trigger();
ROS_INFO_NAMED("arm", "Reference frame: %s", move_group.getPlanningFrame().c_str());
ROS_INFO_NAMED("gripper", "End effector link: %s", move_group.getEndEffectorLink().c_str());
geometry_msgs::Pose target_pose1;
target_pose1.orientation.w = 1.0;
target_pose1.position.x = 0.28;
target_pose1.position.y = -0.7;
target_pose1.position.z = 1.0;
move_group.setPoseTarget(target_pose1);
moveit::planning_interface::MoveGroupInterface::Plan my_plan;
bool success = move_group.plan(my_plan);
ROS_INFO_NAMED("arm", "Visualizing plan 1 (pose goal) %s", success ? "" : "FAILED");
ROS_INFO_NAMED("arm", "Visualizing plan 1 as trajectory line");
visual_tools.publishAxisLabeled(target_pose1, "pose1");
visual_tools.publishText(text_pose, "Pose Goal", rvt::WHITE, rvt::XLARGE);
visual_tools.publishTrajectoryLine(my_plan.trajectory_, joint_model_group);
visual_tools.trigger();
visual_tools.prompt("next step");
move_group.move()
}
Now, everytime I try to build my catkin workspace (catkin_make) I get the following error:
fatal error: moveit/move_group_interface/move_group_interface.h: No such file or directory
compilation terminated.
If I comment out that line this error occurs on planning_scene_interface.h and If I comment this one out it happends to DisplayRobotState.h and so on...
My CmakeList looks likes this:
cmake_minimum_required(VERSION 2.8.3)
project(knaak)
find_package(catkin REQUIRED
COMPONENTS
moveit_core
moveit_ros_planning
moveit_ros_planning_interface
pluginlib
geometric_shapes
moveit_visual_tools
)
catkin_package(
CATKIN_DEPENDS
moveit_core
moveit_ros_planning_interface
interactive_markers
)
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
PATTERN "setup_assistant.launch" EXCLUDE)
install(DIRECTORY config DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
add_executable(arm arm.cpp)
And my Package.xml looks like this:
knaak 0.3.0
An automatically generated package with all the configuration and launch files for using the robotarm_urdf with the MoveIt! Motion Planning Framework placeholder placeholder BSD http://moveit.ros.org/ https://github.com/ros-planning/moveit/issues https://github.com/ros-planning/moveit catkin pluginlib moveit_core moveit_ros_planning_interface moveit_ros_perception interactive_markers geometric_shapes moveit_visual_tools pluginlib moveit_core moveit_fake_controller_manager moveit_ros_planning_interface moveit_ros_perception interactive_markers moveit_visual_tools moveit_ros_move_group moveit_kinematics moveit_planners_ompl moveit_ros_visualization joint_state_publisher robot_state_publisher xacro robotarm_urdf robotarm_urdf
Can anyone help me out getting these dependencies to work? Thanks in advance.
↧