Section 7.8 Writing a custom Action client bug

You should not modify the code given in the notebooks using ChatGPT, as that could result in unexpected behaviour.

Did you start the action server? You should

  • source both workspaces in one terminal and start the action server
  • source both workspaces in another terminal and start the action client

Use the original code given without modifications.

Hi @bayodesgun,

I have did exactly what you’ve asked me to do and replaced the code with the original example but I am still receiving the same output.

Hi @jeffrey.jahja7 , I discovered the issue. Th problem is that the action_server.py is importing the custom message GoToPose form a different package. This happens in ROS2 that even if the message is exactly the same , it wont work.

To fix this change in the action_server.py the import:

#from leo_description.action import GoToPose
from custom_interfaces.action import GoToPose

Then remove and build an ddevel and recompile just to be sure. Now the robot should move to the correct place. I will see to modify this in the notebooks to avoid this issue again. Sorry for the confusion.

Thank you so much @duckfrost2 , I do also request to also make modifications for the source bash commands as it was also quite misleading. Thanks!

You mean about teh sourceing of teh ros2_sims_ws for finding the installed systems?

source /home/simulations/ros2_sims_ws/install/setup.bash
source ~/ros2_ws/install/setup.bash

These ones are the ones I meant

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.