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]

asked 2015-08-10 08:32:48 -0500

AmitShukla_IITK gravatar image

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.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by mgruhler
close date 2015-08-10 09:40:12.264203

Comments

mgruhler gravatar image mgruhler  ( 2015-08-10 09:40:22 -0500 )edit