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

Moveit Group not found: issues executing a plan via cpp

asked 2018-07-05 08:24:33 -0500

Levi_Manring gravatar image

updated 2018-07-05 08:27:43 -0500

gvdhoorn gravatar image

I have created a standard MoveIt! package. I want to control this package "sia5d_cmd" using a node. There are lots of examples of code for this, but no explicit information as to how to get a custom made node to talk with a MoveIt! package.

I have my MoveIt! package (sia5d_cmd) and the package that contains the node (test_moveit) I want to run in the same catkin workspace. I demo.launch the MoveIt! package which contains a group called "sia5d". I then launch my node test_moveit_node.cpp as normal. This is my code for that:

#include <ros/ros.h>
#include <moveit/move_group_interface/move_group.h>

int main(int argc, char **argv)
{
  ros::init(argc, argv, "MoveGroupInterface"); //ros::init_options::AnonymousName
  // start a ROS spinning thread
  ros::AsyncSpinner spinner(1);
  spinner.start();
  // this connects to a running instance of the move_group node
  move_group_interface::MoveGroup group("sia5d");
  // specify that our target will be a random one
  group.setRandomTarget();
  // plan the motion and then move the group to the sampled target
  group.move();
  ros::waitForShutdown();
}

This is the error I get:

[FATAL] [1530796096.618661297]: Group 'sia5d' was not found.
terminate called after throwing an instance of 'std::runtime_error'
  what():  Group 'sia5d' was not found.

I am sure there is some issue with how I am connecting these things together. I am a bit newer to ROS than most, but information online about this is surprisingly sparse and poorly documented and I have been trying for a week to be able to plan/move the robot in RViz using a node. Any help would be much appreciated.

Thanks!

edit retag flag offensive close merge delete

Comments

2

I am a bit newer to ROS than most, but information online about this is surprisingly sparse and poorly documented

The MoveIt tutorials are pretty extensive and would seem to cover this ..

gvdhoorn gravatar image gvdhoorn  ( 2018-07-05 08:27:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-07-05 08:28:15 -0500

gvdhoorn gravatar image
[FATAL] [1530796096.618661297]: Group 'sia5d' was not found.
terminate called after throwing an instance of 'std::runtime_error'
  what():  Group 'sia5d' was not found.

your SRDF does not contain a group definition called sia5d. That is why you get the error.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-07-05 08:20:06 -0500

Seen: 1,310 times

Last updated: Jul 05 '18