Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello @ovelysunshinr,

$ rostopic pub /firefly/command/motor_speed mav_msgs/Actuators '{angular_velocities: [100, 100, 100, 100, 100, 100]}'

I think this is to control motor speed. If you want to fly you need to subscribe to another channel. I am not sure but I can tell it /set_model_state gazebo_msgs/ModelState.

rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:0}},twist:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

Over here from the above, It is publishing position, orientation, twist, I think if you publish the twist you can able to control your done. You can publish this by using scripts in cpp or python.

I would suggest to take a look at this tutorial for more understanding about ros publish and subscribers.

I'm not sure where to find more about this topic and how to make it fly in a specific trajectory?

Over here you can make a trajectory based on Image detection, GPS, or let's say current position to next position for example from my current position at that time you can publish coordinate just from your script and the drone will perform tasks accordingly.

I am not sure if I answer your question is perfect if you have any question feel free to drop comment.

Hello @ovelysunshinr,

$ rostopic pub /firefly/command/motor_speed mav_msgs/Actuators '{angular_velocities: [100, 100, 100, 100, 100, 100]}'

I think this is to control motor speed. If you want to fly you need to subscribe to another channel. I am not sure but I can tell it /set_model_state gazebo_msgs/ModelState.

rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:0}},twist:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

'{model_name:firefly,pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:0}},twist:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

Over here from the above, It is publishing position, orientation, twist, I think if you publish the twist you can able to control your done. You can publish this by using scripts in cpp or python.

I would suggest to take a look at this tutorial for more understanding about ros publish and subscribers.

I'm not sure where to find more about this topic and how to make it fly in a specific trajectory?

Over here you can make a trajectory based on Image detection, GPS, or let's say current position to next position for example from my current position at that time you can publish coordinate just from your script and the drone will perform tasks accordingly.

I am not sure if I answer your question is perfect if you have any question feel free to drop comment.

comment.

Hello @ovelysunshinr,@lovelysunshinr,

$ rostopic pub /firefly/command/motor_speed mav_msgs/Actuators '{angular_velocities: [100, 100, 100, 100, 100, 100]}'

I think this is to control motor speed. If you want to fly you need to subscribe to another channel. I am not sure but I can tell it /set_model_state gazebo_msgs/ModelState.

rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:0}},twist:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

Over here from the above, It is publishing position, orientation, twist, I think if you publish the twist you can able to control your done. You can publish this by using scripts in cpp or python.

I would suggest to take a look at this tutorial for more understanding about ros publish and subscribers.

I'm not sure where to find more about this topic and how to make it fly in a specific trajectory?

Over here you can make a trajectory based on Image detection, GPS, or let's say current position to next position for example from my current position at that time you can publish coordinate just from your script and the drone will perform tasks accordingly.

I am not sure if I answer your question is perfect if you have any question feel free to drop a comment.

Hello @lovelysunshinr,

$ rostopic pub /firefly/command/motor_speed mav_msgs/Actuators '{angular_velocities: [100, 100, 100, 100, 100, 100]}'

I think this is to control motor speed. If you want to fly you need to subscribe to another channel. I am not sure but I can tell it /set_model_state gazebo_msgs/ModelState.

 # For reset your done
rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:0}},twist:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

Over here from the above, It is publishing position, orientation, twist, I think if you have to publish the twist you can message and then you can be able to control your done. You can publish this by using scripts in cpp or python.python or command line.

Command-line: I think it will work. Over here your done will move 10mm from the current position.

rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,twist:{linear:{x:0.01,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

I would suggest to take a look at this tutorial for more understanding about ros publish and subscribers.

I'm not sure where to find more about this topic and how to make it fly in a specific trajectory?

Over here you can make a trajectory based on Image detection, GPS, or let's say current position to next position for example from my current position at that time you can publish coordinate just from your script and the drone will perform tasks accordingly.

I am not sure if I answer your question is perfect if you have any question feel free to drop a comment.

Hello @lovelysunshinr,

$ rostopic pub /firefly/command/motor_speed mav_msgs/Actuators '{angular_velocities: [100, 100, 100, 100, 100, 100]}'

I think this is to control motor speed. If you want to fly you need to subscribe to another channel. I am not sure but I can tell it /set_model_state gazebo_msgs/ModelState.

 # For reset your done
rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:0}},twist:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

Over here from the above, It is publishing position, orientation, twist, I think if you have to publish the twist message and then you can be able to control your done. You can publish this by using scripts in cpp or python or command line.

Command-line: I think it will work. Over here your done will move 10mm from the current position.

rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,twist:{linear:{x:0.01,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

'{model_name:firefly,twist:{linear:{x:0.01,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

I would suggest to take a look at this tutorial for more understanding about ros publish and subscribers.

I'm not sure where to find more about this topic and how to make it fly in a specific trajectory?

Over here you can make a trajectory based on Image detection, GPS, or let's say current position to next position for example from my current position at that time you can publish coordinate just from your script and the drone will perform tasks accordingly.

I am not sure if I answer your question is perfect if you have any question feel free to drop a comment.

Hello @lovelysunshinr,

$ rostopic pub /firefly/command/motor_speed mav_msgs/Actuators '{angular_velocities: [100, 100, 100, 100, 100, 100]}'

I think this is to control motor speed. If you want to fly you need to subscribe to another channel. I am not sure but I can tell it /set_model_state gazebo_msgs/ModelState.

 # For reset your done
rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:0}},twist:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

Over here from the above, It is publishing position, orientation, twist, I think if you have to publish the twist message and then you can be able to control your done. You can publish this by using scripts in cpp or python python or command line.

Command-line: I think it will work. Over here your done will move 10mm from the current position.

rostopic pub --once gazebo/set_model_state gazebo_msgs/ModelState '{model_name:firefly,twist:{linear:{x:0.01,y:0,z:0},angular:{x:0,y:0,z:0}},reference_frame:world}'

I would suggest to take a look at this tutorial for more understanding about ros publish and subscribers.

I'm not sure where to find more about this topic and how to make it fly in a specific trajectory?

Over here you can make a trajectory based on Image detection, GPS, or let's say current position to next position for example from my current position at that time you can publish coordinate just from your script and the drone will perform tasks accordingly.

I am not sure if I answer your question is perfect if you have any question feel free to drop a comment.