-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crazyflie2_without_controller.launch without MAV appearing #36
Comments
Thanks for opening your first issue here! Make sure that no other issues on the same topic have already been opened! |
Ok, let's start from the beginning. I mean, let's start understanding why when you run the Then, copy and paste the verbose (if it does not work). |
Well that appears to work, it comes up paused with the MAV off the ground. |
So i think I understand this issue now, the text in the tutorial does not include a section of the launch file:
|
Ok, great! It means that your configuration is ok. I mean, there are no problems with the ROS package. Now, the drone is waiting for commands, i.e., the propellers angular velocity. You can provide this command in open loop, typing on another terminal line the command
or you can send it by using MATLAB together with the Robotic System Toolbox, as it is described in the Wiki page. Further information are described in the reference publications. |
When I execute the following command in a terminal - Gazebo starts and the drone is visible: Side Note: I am able to execute the MATLAB 'main.m' file in addition with |
Ok! I think there is a typo in the name of the topic. I suggest you to the commands Of course, when the controller is disabled (MATLAB script ends) the drone falls down. If you have other questions or doubts, please do not hesitate to ask. Otherwise, feel free to close the issue. |
Hello @gsilano, I am having some trouble with the supplied launch file in this MATLAB tutorial. After running the crazyflie2_without_controller.launch (minor change to file to be, paused = false and verbose = true), I receive no errors/warnings. The MAV does not appear in Gazebo, is this normal? I am able to successfully launch the other example in CrazyS (roslaunch rotors_gazebo crazyflie2_hovering_example.launch) without any problems. I am using Ubuntu 18.04 / Melodic / Gazebo 9 per the tutorial in CrazyS.
I am using the command below to execute the launch:
roslaunch -p 1234 ~/catkin_crazys_ws/src/CrazyS/rotors_gazebo/launch/crazyflie2_without_controller.launch
If I am correct, I am forcing the master port to be 1234 with this command, and in the 'main.m' I changed line 13 (since its both my machine running Gazebo and ROS) to be my machines URL and port 1234. I was required to comment/un-comment the supplied 'main.m' to be have the lines 17 commented, line 18 un-commented, line 19 commented, and line 20 un-commented. (I believe this is due to the structure of the custom messages that was required to be added.)
Therefore that section of code looks like this:
%Topics will be used during the simulation
% sub = rossubscriber('/crazyflie2/odometry_sensor1/odometry'); % contains the drone state
sub = rossubscriber('/crazyflie2/odometry_sensor1/odometry','nav_msgs/Odometry'); % contains the drone state
% sub2 = rossubscriber('/crazyflie2/motor_speed');
sub2 = rossubscriber('/crazyflie2/motor_speed','mav_msgs/Actuators');
[pubCmd, msgCmd] = rospublisher('/crazyflie2/command/motor_speed','mav_msgs/Actuators');
The MATLAB 'main.m' script hangs/pauses at line 188 which is this command:
msgS = receive(sub);
I believe this is fairly expected since the Gazebo appears to not have launched correctly and the MATLAB cannot talk to Gazebo.
Thanks for your help in advance.
The text was updated successfully, but these errors were encountered: