# ROS Basics in 5 Days Husky Exam

**URL:** <https://get-help.theconstruct.ai/t/ros-basics-in-5-days-husky-exam/3674>\
**Category:** ROS Basics In 5 Days (Python)\
**Created:** [May 20, 2020, 3:59am UTC](https://get-help.theconstruct.ai/t/ros-basics-in-5-days-husky-exam/3674 "2020-05-20T03:59:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordan.a.smith](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/jordan.a.smith/32/10_2.png) [@jordan.a.smith](https://get-help.theconstruct.ai/u/jordan.a.smith)\
**Post date:** [May 20, 2020, 3:59am UTC](https://get-help.theconstruct.ai/t/ros-basics-in-5-days-husky-exam/3674/1 "2020-05-20T03:59:11Z")

</div>

What is the action server in the Husky Maze challenge looking for (a certain number of positions, the entire Odometry data set, etc.)? It is the only error I have on the exam for the course and I cannot figure out what is wrong with the action server result.

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [May 20, 2020, 9:42am UTC](https://get-help.theconstruct.ai/t/ros-basics-in-5-days-husky-exam/3674/2 "2020-05-20T09:42:22Z")

</div>

Hi @jordan.a.smith,

Welcome to the Community!

To help you better and faster, could you please provide more details? About the error you mentioned and the specific exam you are talking about.

---

<div class="post-metadata">

**Author:** ![jordan.a.smith](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/jordan.a.smith/32/10_2.png) [@jordan.a.smith](https://get-help.theconstruct.ai/u/jordan.a.smith)\
**Post date:** [May 23, 2020, 11:54pm UTC](https://get-help.theconstruct.ai/t/ros-basics-in-5-days-husky-exam/3674/3 "2020-05-23T23:54:32Z")

</div>

Hi! This is regarding the ROS Basics in 5 days Husky Exam.

Here is a screen shot of the auto-grader output:

 ![Screen Shot 2020-05-13 at 6.16.03 PM](https://get-help.robotigniteacademy.com/uploads/default/original/2X/c/c7a009d85681225c940148fe980052b6ef3b0371.png)

The action server is fully operational but my guess is I am not delivering the exact message type the grader is expecting. My action server currently returns OdomData.pose.pose.position but I am wondering if it requires a different data type to be returned?

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [May 25, 2020, 9:14am UTC](https://get-help.theconstruct.ai/t/ros-basics-in-5-days-husky-exam/3674/4 "2020-05-25T09:14:32Z")

</div>

Hi again!

Your are right, your action server should return a message type of `YourActionResult`, not a `Position` or any other message.

If you follow the example given in the notebook, your server code should end with something like:

```auto
self._as.set_succeeded(self._result)
# the `self` variable here may not be necessary if you are not using a class as was done in the example
# `_as` is your action server variable
# `_result` is your action's Result message.

```

And this should return the right kind of message for you.

---

<div class="post-metadata">

**Author:** ![jordan.a.smith](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/jordan.a.smith/32/10_2.png) [@jordan.a.smith](https://get-help.theconstruct.ai/u/jordan.a.smith)\
**Post date:** [May 26, 2020, 4:28am UTC](https://get-help.theconstruct.ai/t/ros-basics-in-5-days-husky-exam/3674/5 "2020-05-26T04:28:09Z")

</div>

Got it. My action sever return does look like that and is properly returning data. I believe the issue is with the specific data set I return in that result object. I believe the grader is expecting a different data type than the one I am currently placing as the result. Here is my call back function (action server goal):

def odom\_callback(self, DataPoint):  
rospy.sleep(1)  
self.ResultObj.data.append(DataPoint.pose.pose.position)

The result action message data attribute is currently set as the x,y,z coordinate data. Is the auto grader expecting a different section of data to be returned (position + orientation, entire Pose variable, etc.)?

Thank you for your help thus far.

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [May 26, 2020, 11:13am UTC](https://get-help.theconstruct.ai/t/ros-basics-in-5-days-husky-exam/3674/6 "2020-05-26T11:13:13Z")

</div>

I think the problem might be that the `call -> execute -> response` cycle for the action server might have some issues or unexpected results.

Did you try calling the action server from a terminal? Did it execute cleanly without errors?  
Did you define the action message as expected? Is there something in the action server response that indicates that it succeeded?
