I have difficulty that I am able to use ($rosservice call /ardrone/togglecam) command from terminal to toggle between front and bottom camera of AR Drone but same I am not able to do from my python code [closed]
I have difficulty that I am able to use ($rosservice call /ardrone/togglecam) command from terminal to toggle between front and bottom camera of AR Drone but same I am not able to do from my python code.
I am using:
to generate publishing command
Self.Pubtogglec = rospy.Publisher(‘/ardrone/togglecam’, Empty)
#Then I have defined a function to finally publish this command to ardrone
Def ToggleBCam(self):
Self.Pubtgglec.publish(Empty())
My code is reaching to this ToggleBCam method (as I am printing some massage there to see if it reaches to this publish line or not) but this is not changing video feed. I am not sure what exactly wrong I am doing. I have search extensively but I have not found any help either. Can you please help me, how I can toggle camera from my python code? I habve seen some of the old tutorial methods have used above mentioned method for toggling cam but why I am not able to do that.
duplicate of http://answers.ros.org/question/21553...