-
Notifications
You must be signed in to change notification settings - Fork 123
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
report error #include <mav_msgs/CommandMotorSpeed.h> #5
Comments
I believe you need to compile the mav_msgs package first. See http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv for information about ROS messages. Specifically, it states "Any .msg file in the msg directory will generate code for use in all supported languages. The C++ message header file will be generated in ~/catkin_ws/devel/include/beginner_tutorials/." Therefore, once you build the mav_msgs package, the CommandMotorSpeed.h file should be generated in the ~/catkin_ws/devel/... directory. Let me know if that helps. I can try to locate the CommandMotorSpeed.h on my test machine if you need the exact file path. |
Thanks for your response. I can compile the file successfully. Thanks for your help. In addition ,there are two editions of mav_comm package in github, which is a little different. Can I just use the command below with the instructions on your webpage to get the result ? I can launch the gazebo and rviz successfully. But I can't interact with the model in rviz now. When I set the fixed frame to world, it seems there is a problem , but it works when I set the fixed frame to base_link. And also I don't know what I should do next to help the quadrotor fly autonomously. What's more, there is no quadrotor model in gazebo. |
Yes you should be able to run that command to start the 3D navigation simulation. I added a detailed readme to this package so see if those instructions help. If you still have issues with the tf, I can post the tr graph. Also, you can download the models from the rotors simulator package described in the readme. The readme also describe the different flight modes that can be enabled by pressing certain buttons on the controller. This is defined in the quad_joystick_interface package. |
So many thanks!I will follow! |
Many thanks for your help! However, when I launched quad_3nav.launch, I can see the quadrotor with interactive markers in rviz, while when I add a pointcloud2 message, there is an error:
I check the tf frame and found that there is no connection between frame 'world' and 'baselink', and I can not see the octomap in rviz. I follow the moveit! tutorials and set the fixed frame to 'world'. Any suggestions to solve this problem? |
Thanks for checking on the mav_comm package. Which "rotors_simulate" package were you referring to the current mav_comm package doesn't support? I ran the quad_3dnav.launch file and got the TF tree at this link: the kit_c_base.xacro file declares the parent_link variable to be base_link. Then in the component_snippets-xacro file, the camera_macro has the link_name to be namespace/camera__link with a namespace/camera_joint that has a link name of namespace/camera_optical_center_link. That should be the linkages up to the base_link. I can paste the full text output when I run the launch command as well if that helps. |
Thanks for your reply , the "rotors_simulate" package means the "rotors_simulator" pakage bt eth (https://github.com/ethz-asl/rotors_simulator). Still I can not get the correct TF tree as you indicate above.I have "world " to "odometry" in tf tree but there is no link from 'world' to 'base_link'. My file is just copy yours https://github.com/wilselby/ROS_quadrotor_simulator/blob/master/quad_description/urdf/kit_c_base.xacro, would you please tell me which code is mean to achieve this transformation? |
The purpose of the world joint mechanism is to allow you to position your robot's base in the world. This joint isn't contained in the URDF as it's not really an aspect of your robot, but rather a product of whatever odometric system you are using. The /odom (to /base_link) frame is broadcast by an odometry producing node. Specifically, as you noted, this is handled in the kit_c_base.xacro file
which is then input into the odometry_plugin_macro in component_snippets.xacro. You can see the parent_frame_id set to world and the parent_link set to base_link. Can you try recopying both those files to double check? If that doesn't work, can you try running: and see if that works? That is a very basic simulation of the quadrotor in an empty world. When I run it, I just have a TF tree of world connected to base_link. If you look at the node graph, you should have the /gazebo node publishing a /tf topic. Here are some other potential RViz settings you could check if neither of the above work. Do you see any errors in the RViz menu? Global Options->Fixed Frame: "world" |
I have tried recopying the file but still there is no link between /odom and /base_link. By the way ,should I run some odometry or slam node if I want to do 3D mapping? I always thought that I can achieve 3D mapping as you depict singly by running the quad_3dnav node.Is it right? Or I need additional odometry node or GPS to provide the localization of the quadrotor? Many thanks! |
Did you try all of the different options above including replacing the components.xacro file? The GPS odometry node is automatically run with the base quadrotor. For 3D nav, that sensor is used for localization and the Kinect is used to create the octomap for obstacle avoidance and path planning. The quad_3dnav.launch file launches the move_group.launch which runs the quad_moveit_sensor_manager.launch file which loads the ensors_kinect.yaml config file that contains the kinect sensor topic. The 2D navigation simulation does so localization if you would like to see an example. It uses the AMCL package for localization in a known map. |
sorry for trouble, I tried but still can not get the tf from world to base_link, should I turn GPS mode on then I can get this tf? I didn't have xbox joystick so this is the last thing I didn't do. |
No trouble at all, sorry it's not working for you. I don't think enabling GPS mode will have a difference. Can you run roslaunch quad_gazebo quad_joystick_empty_world.launch and verify the TF map still has the same issue? |
when I trying to compile the 3d_nav package ,I got the error
fatal error: mav_msgs/CommandMotorSpeed.h: No such file or directory
#include <mav_msgs/CommandMotorSpeed.h>
And I checked the mav_msgs package, I just cannot find the commandMotorsSpeed.h file in that package.
I install the mav_msgs using the package https://github.com/ethz-asl/mav_comm
Apparently there is no such kind of .h file in that package,what should I do ?
The text was updated successfully, but these errors were encountered: