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

Revision history [back]

click to hide/show revision 1
initial version

Not entirely sure but I think it's due to some naming issues.

int main(int argc, char** argv)
{
  ros::init(argc, argv, "go_drive");

  GoDriveAction go_drive(ros::this_node::getName());
  ros::spin();

  return 0;
}

You set the default name to go_drive so when you are using rosrun you will have ros::this_node::getName() returning go_drive as expected. In the case of the launch file you have :

<node pkg="action_test" type="GoDriveActionServer" name="GoDriveActionServer" />

In this case ros::this_node::getName() will return GoDriveActionServer, that shouldn't be an issue if you add everything dynamically set but here :

SimpleActionClient::SimpleActionClient() : 
  take_video_client_("take_video", true),
  go_drive_client_("go_drive", true)
{
  ROS_INFO_STREAM("Starting simple action client");
  // SUBSCRIBE SOMETHING
}

You have set the name to go_drive. That's why with roswtf you do have the names go_drive and GoDriveActionServer used. So you can change the default names to match the one in the launch files or directly change in the launch file with your default names.