Ros2 Attribute Error no attribute kill
I made a custom service where I use the /kill function from turtlesim but for some reason the package can't find the /kill service at all because when I call service list the option does not appear. I added
from turtlesim.srv import Spawn, Kill, TeleportAbsolute, SetPen
from turtlesim.msg import Pose
to my node file and call the service in the node file like:
self.kill_future = self.kill.call_async(Kill.Request(name="turtle1"))
I also have
find_package(turtlesim REQUIRED)
in my Cmake file and
<build_depend>turtlesim</build_depend>
<exec_depend>turtlesim</exec_depend>
in the package.
Am I missing something?