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

I think you are abit confused about how you would want to write your test. There are 2 ways to write test in your case:

  1. Library level test: since you can create an MoveBaseAction object, you can just you can access all the class attributes and functions (after add the FRIEND_TEST to header file, of course). So you dont have to use waitForServer , sendGoal , etc. Instead, you can just create a MoveBaseGoal object and call the execute function directly. After that, you can just compare the outcome of result_ object.
  2. Node level test: you can create a proper node (something similar to https://github.com/ros-planning/navigation/blob/indigo-devel/move_base/src/move_base_node.cpp). Then you can launch this node during your test. In this case, you can use your test node as action client (like http://wiki.ros.org/actionlib_tutorials/Tutorials/SimpleActionClient)