Open netgittemp opened 5 years ago
@netgittemp I am trying to understand what exact problem you are describing but the information you provide is kinda short.
However, after installing rotor_simulator in "catkin_ws_RotorS" folder (https://github.com/ethz-asl/rotors_simulator)
What does this have to do with what is described in https://dev.px4.io/v1.9.0/en/ros/mavros_offboard.html? What you see on that page is using sitl_gazebo with PX4 SITL, meaning that PX4 is running over SITL and connected to Gazebo through Mavlink. rotors_simulator
is a package set (where sitl_gazebo
has its origin), but for a long time the PX4 ecosystem focused its development on sitl_gazebo
. So if you are trying to use rotors_simulator
with the PX4 SITL, I advise you to bring your questions there instead.
In any case, I don't see anywhere this is an issue with MAVROS, but rather with what you are trying to do with rotors_simulator
.
@TSC21 I am sorry for confusing you. I am trying to use offboard mode with MAVROS. As I mentioned in the post, I used
~/src/Firmware$ sudo make px4_sitl gazebo
$ roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"
~/catkin_ws$ rosrun px4_offboard offboard_ex
However, the quadrotor in Gazebo does not move at all. The output of $ rostopic echo /mavros/state/
is
---
header:
seq: 48
stamp:
secs: 1572622117
nsecs: 473311580
frame_id: ''
connected: True
armed: False
guided: True
manual_input: False
mode: "AUTO.LOITER"
system_status: 3
---
Could you help me to resolve this issue? Thanks.
FYI, I reinstalled ubuntu 16.04.
and Installed ROS and mavros using Binary installation (deb)
( MAVROS pacakge is not in the catkin_ws
, it is in the following directory.
$ roscd mavros
/opt/ros/kinetic/share/mavros$
)
Then, following commands work correctly hovering the quadrotor in Gazebo
~/src/Firmware$ sudo make px4_sitl gazebo
$ roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"
~/catkin_ws$ rosrun px4_offboard offboard_ex
When I install mavros using Source installation, however, I do not know how to run offboard example. Because installing mavros generatescatkin_ws
...
I tried to create example package in /catkin_ws/src
, and run $ catkin build
.
It did not work.
So I make another workspace like catkin_ws_offboard
, and build using catkin_build
.
Then, I got the error;
fatal error: mavros_msgs/CommandBool.h: No such file or directory
compilation terminated.
offboard_test/CMakeFiles/offboard_test.dir/build.make:62: recipe for target 'offboard_test/CMakeFiles/offboard_test.dir/src/offboard_test.cpp.o' failed
make[2]: *** [offboard_test/CMakeFiles/offboard_test.dir/src/offboard_test.cpp.o] Error 1
CMakeFiles/Makefile2:651: recipe for target 'offboard_test/CMakeFiles/offboard_test.dir/all' failed
make[1]: *** [offboard_test/CMakeFiles/offboard_test.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
So now, my question is that
How to run offboard example with MAVROS which is installed via Source installation.
In this case MAVROS package is in catkin_ws/src
.
It would be very thankful if you help me. Thank you.
Hi @netgittemp, did you solve your problem? I seem to have the same problem. It seems to be a problem with the mavros version but I don't know yet how to solve it.
you have to publish your messages at least with 2 hz. https://docs.px4.io/v1.9.0/en/flight_modes/offboard.html
Issue details
Hi, I installed mavros using
$ sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras
and I successfully worked with gazebo simulation for offboard example (https://dev.px4.io/v1.9.0/en/ros/mavros_offboard.html). I used the following commands;However, after installing rotor_simulator in "catkin_ws_RotorS" folder (https://github.com/ethz-asl/rotors_simulator) offboard mode does not work with the same commands.... I am not sure it is the problem, but for your information, I found mavros package is connected with mavros folder in the "catkin_ws_RotorS" using
roscd
Could you give some advice for resolve this issue?
MAVROS version and platform
Mavros: ROS: Kinetic Ubuntu: 16.04
Autopilot type and version
[ ] ArduPilot [ 0 ] PX4
Version:
Node logs
Diagnostics
Check ID