Hello,
I have encountered a problem while doing the third and last part of the rosject.
I had the idea to use a box area centered in the start position to know if the robot does a lap on the circuit, so my server starts listening and listing the odom reads on the result variable, but when I end the experiment (for that I need to get out of the area, to prompt the second part of the project, and then come back again) I encounter an issue with the result of the action.
I attach pictures of the terminals:
<Terminal 2>: The Server Node
user:~/catkin_ws/src/action_pkg/scripts$ rosrun action_pkg action_server.py
#Start
[INFO] [1681299902.707323, 489.203000]: x_min = -0.10796711479883608, x_max = 0.29203288520116394
[INFO] [1681299902.710768, 489.205000]: y_min = 0.10634606622543119, y_max = 0.5063460662254312
[INFO] [1681299902.845626, 489.288000]: Odom Readed
[INFO] [1681299902.851840, 489.291000]: Position Added to the List
[INFO] [1681299902.854861, 489.293000]: Feedback Updated
[INFO] [1681299902.864026, 489.300000]: x = 0.09202386138625213, y = 0.3063460662254312
[INFO] [1681299904.431879, 490.317000]: Odom Readed
# The robot gets out of the box area
[INFO] [1681299941.921831, 512.215000]: El robot ha salido del cuadro de control
[INFO] [1681299942.116995, 512.323000]: Odom Readed
[INFO] [1681299942.121676, 512.324000]: Position Added to the List
[INFO] [1681299942.136707, 512.338000]: Feedback Updated
(Repeats)
# The robot enters again to the area
[INFO] [1681299943.534329, 513.158000]: El robot ha dado una vuelta, enviando resultado
# I added a line to see what was inside the variable self._result (which is the one that I use to call the
# set_succeeded
[INFO] [1681299943.539749, 513.165000]: list_of_odoms:
- [0.09202386138625213, 0.3063460662254312, 0.3605375825121338]
- ... (There are a bunch more)
<Terminal 4>: rostopic echo /record_odom/Result
user:~$ rostopic echo /record_odom/result
WARNING: no messages received and simulated time is active.
Is /clock being published?
header:
seq: 1
stamp:
secs: 3848
nsecs: 550000000
frame_id: ''
status:
goal_id:
stamp:
secs: 3848
nsecs: 346000000
id: "/actions_quiz-1-3848.346000000"
status: 4
text: "Exception in execute callback: 'list' object has no attribute 'x'"
result:
list_of_odoms: []
---
So I donât know if I did something wrong, I have tried to append the elements in list_of_odoms as _result.list_of_odoms.x.append() but didnât work, so I added them as each element of list_of_odoms is a list composed by (x,y,theta).
In any case, if you need some of my code to check it just ask me, I would love to solve this issue asap
(Iâm not posting anything at the moment in case it breaks any rules according to Rosjects)