Giter Site home page Giter Site logo

Comments (36)

szebedy avatar szebedy commented on July 18, 2024

Hi @dominiknatter

I'm not sure why this problem occurs, since the commit you mentioned seems to be available.

I would delete my repository completely and start again from cloning it. Let me know if the problem still persists.

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

Hi @szebedy

I deleted my repository with rm -rf and was able to successfully clone your folder, just as before. But the update step again told me 'reference is not a tree' for the submodule in libuavcan.

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

As a remark: I tried the two first answers of this topic (https://stackoverflow.com/questions/2155887/git-submodule-head-reference-is-not-a-tree-error), but neither helped. (Not sure if that topic 100% applies to my problem, though).

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

Hi @szebedy

I raised this issue in the repository of libuavcan directly. Apparently they have deleted some old branches a few days ago (see here for more information).

Do you think your code would work with a newer commit? If my try mentioned above was correctly executed, it would not work with the newest commit.

As I mentioned in the other forum/issue, I found a repository that looks quite similar. So I tried from the beginning (i.e. with cloning your repository). For the missing libuavcan I used the mentioned repository.

In that repository, I used git submodule update --init --recursive to get all referenced submodules (which then again are the newest of their type and therefore probably do not match the ones you used - that could be a problem. And checking out everything manually is not my first priority). Anyway, using make posix_sitl_default gazebo now seemed to work, but then in the end raised this big error:

fail_using_repo_of_dagar_1
fail_using_repo_of_dagar_2

Does this help for finding any suggestions? For the time being, I've run out of ideas. Apparently this newest method did not get rid of the error. Concerning the part with mavlink: I cannot assure that this error has not been here around since the beginning, maybe it occured in the middle of the make posix_sitl_default gazebo output and I did not see it up to now.

Sorry for the inconveniences.

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

Hi @dominiknatter thanks for figuring out the problem.

Can you try the following:

cd ~/catkin_ws
rm -rf px4
git clone https://github.com/PX4/Firmware.git px4 
cd px4

Then change line 23 the ~/catkin_ws/px4/.gitmodules file
from url = https://github.com/px4/sitl_gazebo.git
to url = https://github.com/szebedy/sitl_gazebo.git

Also change line 16 of ~/catkin_ws/px4/launch/mavros_posix_sitl.launch file
from <arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/>
to <arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/iris_r200/iris_r200.sdf"/>

For reference see szebedy/px4@fbf5ecd...37ca964

Then finish the installation with

cd ~/catkin_ws/px4
git submodule update --init --recursive
make posix_sitl_default gazebo
cd ~/catkin_ws
catkin_make
source ./devel/setup.bash

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

Hi @szebedy
I executed the demanded changes, but upon calling git submodule update --init --recursive I get another checkout error with your repository:

checkout_error_adapted_repo

Edit: Using git submodule sync before git submodule update (as suggested here) made it possible to run everything without an error (as far as I can tell). Although no window showing a quadcopter popped up, that's a bit suspicious.

Anyway, I will try downloading the SVO 2.0 now and then try a launch. I'll keep you updated!

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@dominiknatter

Sorry I forgot that my .gitmodules file will still point to my px4 fork. I edited my previous comment so that the git submodule update --init --recursive is only executed inside the px4 folder.

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

@szebedy

Ok to be totally sure I started over with deleting my px4 folder and followed your edited comment. Now I got this at the end of the execution of git submodule update --init --recursive. I do not know to what this SHA should belong though (or more like: from where it arised).

checkout_error_sitl_gazebo

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

That is the newest commit of the original https://github.com/PX4/sitl_gazebo/commits/master

Looks like you didn't update the px4/.gitmodules file to use my sitl_gazebo fork.

Change line 23 px4/.gitmodules
from url = https://github.com/px4/sitl_gazebo.git
to url = https://github.com/szebedy/sitl_gazebo.git

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

I am very sorry to tell you that I did that, see here:

changed_line_23_gitmodules

Shall I try using git submodule sync before git submodule update again?

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

It's weird that it's still trying to reach the repository from px4...

How about this

cd ~/catkin_ws/px4/Tools
rm -rf sitl_gazebo
git clone https://github.com/szebedy/sitl_gazebo.git sitl_gazebo
cd ~/catkin_ws/px4
make posix_sitl_default gazebo

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

I cloned it, make posix_sitl_default gazebo printed half a screen of (successful) commands and then this:

error_new_sitl_gazebo_clone

haven't touched it yet. But if this is what you expected with your change, I assume to press y and enter next.

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@dominiknatter hit y and enter

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

@szebedy
it seemed to finish without an error and in the end printed make[1]: Leaving directory '/home/dominik/catkin_ws/px4'. So again, no window showing a quadcopter popped up. If you think that should be no problem, I will try to succeed with the installation, else I am happy to help you investigate further.

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@dominiknatter Could be alright. Please proceed with the installation guide and see what happens when you run the simulation with roslaunch offboard_control simulation.launch

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

hi @szebedy

I continued with the installation including the external instructions for SVO. SVO tests produced the expected results.

Following the chapter "Usage/Simulation" with only 2 terminals and a launch file brought this up:

missing_intel_aero_launch_file

If this concerns the intel_aero.launch in /catkin_ws/src/offboard_control/launch/: I double-checked whether I ran source ./devel/setup.bash in ~\catkin_ws and yes, I did run it.

So I tried the other startup method using 7 terminals and no launch file. The first terminal brought this up after calling roslaunch px4 mavros_posix_sitl.launch:

startup_iris_error

I again double-checked whether I renamed line 16 of ~/catkin_ws/px4/launch/mavros_posix_sitl.launch in the way you stated and yes, I did.

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@dominiknatter

Thanks for noticing this. Forgot to mention in the installation guide that you need to copy the calibration and launch files to the svo installation folder. If you show me the contents of ~\svo_ws I can tell you where exactly.

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@dominiknatter

Can you also try to change line 16 of ~/catkin_ws/px4/launch/posix_sitl.launch file (not just mavros_posix_sitl.launch)
from <arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/>
to <arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/iris_r200/iris_r200.sdf"/>

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

@szebedy

See the first 2 levels of ~\svo_ws here:

content_of_svo_ws

I changed line 16 of said file, but the same errors when calling roslaunch px4 mavros_posix_sitl.launch within the first of 7 terminals occurred.

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@dominiknatter

I checked this problem today with a fresh Ubuntu 16.04 install. I was able to launch the simulator just by replacing the libuavcan repository with the latest version. I commited this change so you could remove px4 folder pull the changes, and init submodules again, or just apply the same changes:

cd ~/catkin_ws/px4/modules/uavcan
rm -rf libuavcan
git clone https://github.com/UAVCAN/libuavcan.git libuavcan

Could you show me the contents of ~/svo_ws/build/svo_ros and ~/svo_ws/src/rpg_svo_example?

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

Hi @szebedy
thanks for trying. I am not 100% sure what you meant, so I'll try to recap:

  • I deleted my folder ~/catkin_ws/px4 (as I had no folder uavcan in it, because for the last try I used the commit of github.com/px4/firmware, not yours...)
  • in ~/catkin_ws I used git clone https://github.com/szebedy/px4.git
  • in ~/catkin_ws I used git submodule update --init --recursive
  • it was unable to checkout libuavcan (it said e1c9a4f5064a336295125da25c0542a5cd601dd7 is not a tree), so I went to ~/catkin_ws/px4/src/modules/uavcan, deleted the empty folder libuavcan and used git clone https://github.com/UAVCAN/libuavcan.git libuavcan.

Was that all and correct? Or do I still have to change ~/catkin_ws/px4/launch/mavros_posix_sitl.launch and ~/catkin_ws/px4/.gitmodules (and ~/catkin_ws/px4/launch/posix_sitl.launch) again?

Be happy to see the content of ~/svo_ws/build/svo_ros and ~/svo_ws/src/rpg_svo_example here:

folder_content_svo_ros_rpg_svo_example

PS: I think in your last message you wanted to write cd ~/catkin_ws/px4/src/modules/uavcan instead of cd ~/catkin_ws/px4/modules/uavcan (missing the folder src)

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@dominiknatter

I updated the autonomous-drone repository to fix the problems with libuavcan. You could have had the same results just by deleting ~/catkin_ws and cloning my repository again.

Technically what you did was correct but you still have the "old" version of my repository with fix applied by you. (For git this makes a difference, so it will be difficult to get more updates from me but for the moment you have the same source files)

With github.com/px4/firmware it's never going to work because they don't have the simulation environment set up for this specific repository. I created a simulation world with a simulated intel aero rtf drone inside the sitl_gazebo submodule of px4.

I think the folder we were looking for is ~/svo_ws/src/rpg_svo_example/svo_ros, can you please show the contents of it?

To make sure can you also show the output of cat ~/svo_ws/devel/setup.bash

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

hi @szebedy
oh I see. So to be sure I deleted ~/catkin_ws, cloned your repository again with git clone https://github.com/szebedy/autonomous-drone.git catkin_ws and updated the submodules with cd ~/catkin_ws and git submodule update --init --recursive. That worked indeed, but cd ~/catkin_ws/px4 && make posix_sitl_default gazebo unfortunately yielded this common error:

new_old_error_sitl_mavlink_1
new_old_error_sitl_mavlink_2

See the demanded output here:
output_of_svo_ros_and_setup_bash

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@dominiknatter You should be able to launch svo after copying the configuration files with

cp -r ~/catkin_ws/vio_calibration/svo_aero ~/svo_ws/src/rpg_svo_example/svo_ros/

Can you confirm that this works afterwards?

cd ~/svo_ws/
source ./devel/setup.bash
roslaunch svo_ros intel_aero.launch

I'm not sure why you get that error since I was able to build px4 today without any errors on a fresh Ubuntu 16.04 install just by following my installation instructions. It looks like my sitl_gazebo version is not compatible with your mavlink installation. Did you install ROS based on my instructions or did you already have it installed? Can you execute the following command and try again?

sudo /opt/ros/kinetic/lib/mavros/install_geographiclib_datasets.sh

Sometimes when you copy a block of commands and something occurs, not all of them are executed. Make sure to check that all installation steps were successful line by line.

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

hi @szebedy
I copied the configuration files. roslaunch svo_ros intel_aero.launch prints out some lines of [INFO] and [WARNING] and at some point stops throwing any commands at all. rosnode list lists /svo and rostopic list lists like a dozen /svo/... commands too - so I guess that works.

I did install (or tried to install) it based on your instructions. However, as your suggested command does not offer any changes (it returns something like "already up to date, skip"), I will make sure to uninstall everything concerning ROS and Gazebo and pursuing a new install line by line tomorrow.

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

The only thing I can imagine is that when you cloned and built the original px4 firmware (with make posix_sitl_default gazebo), it installed a newer version of mavlink with it, which is not compatible with my repository anymore. If you don't manage to make it work I'd recommend an Ubuntu reinstall because it might be faster (I was done with the whole thing in an hour).

You could also try to make my code work with the newest px4 firmware, I basically only changed the px4/Tools/sitl_gazebo submodule (apart from that launch file) in order to have customized models and worlds that simulate my application.

For reference you can see all commits here that show you how I did it. https://github.com/szebedy/sitl_gazebo/commits/0dfbfd536012843ce038bc40c358197b26c307cf

I am closing this issue since thanks to your remarks it should work now if installed as per instructions.

Happy coding!

from autonomous-drone.

logindiamant avatar logindiamant commented on July 18, 2024

Hi! I solve problem by reinstall version of mavlink to ros-kinetic-mavlink_2018.9.17-1_amd64.deb
https://github.com/szebedy/autonomous-drone/issues/5#issuecomment-455810577
So, delete ros-kinetic-mavlink by Synaptic...
Install mavlink ros-kinetic-mavlink_2018.9.17-1_amd64.deb
sudo apt-get install ros-kinetic-mavros
sudo apt-get install ros-kinetic-mavros-extras

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

@szebedy
Although a first reinstall of Ubuntu did not bring any success, I wanted to thank you for your thorough support during the last days!

@logindiamant
Sorry, I am not sure I understood everything. To recap:

  • You used the software 'Synaptic Package Manager' to delete the package ros-kinetic-mavlink.
  • Then you used the same software to install mavlink ros-kinetic-mavlink_2018.9.17-1_amd64.deb
  • you finished with sudo apt-get install ros-kinetic-mavros and sudo apt-get install ros-kinetic-mavros-extras.

Was that correct?
How far did you go in the installation guide before doing this? Did you execute everything up to make posix_sitl_default gazebo?

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

Did you also install the 64 bit desktop version of ubuntu?

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

Yes, see my configuration here:

current_ubuntu_setup

I work on a dual-boot system with Windows 10 running on another partition, but I hope that does not influence anything here.

from autonomous-drone.

dominiknatter avatar dominiknatter commented on July 18, 2024

btw, concerning your general idea that a ROS reinstall alone is not enough: indeed during my last ROS reinstall, I saw that for each of these 3 commands

sudo apt-get install ros-kinetic-desktop-full
sudo apt install ros-kinetic-mavros ros-kinetic-mavros-extras
sudo apt-get install libeigen3-dev ... ros-kinetic-sophus

I got an output like "0 to upgrade, 638 to newly install, 0 to remove and 2 not to upgrade", so I thought those '2 not to upgrade' might be problematic / what you meant. After the complete Ubuntu reinstall I paid attention again and it stated '0 not to upgrade' for each of those commands. But apparently that fact did not help though.

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

@logindiamant how did you install mavlink ros-kinetic-mavlink_2018.9.17-1_amd64.deb? Do you mean this?
Can you share a link where to find this and how to install it?

from autonomous-drone.

logindiamant avatar logindiamant commented on July 18, 2024

https://drive.google.com/file/d/1Su5Ykg08xJZcytiywttlJ4EPBCvU1tYd
Just double click file, opened gui, click install...

from autonomous-drone.

mkpvishnu avatar mkpvishnu commented on July 18, 2024

I am getting the same error.
Could anyone just recap what i should do now?

from autonomous-drone.

szebedy avatar szebedy commented on July 18, 2024

I updated the repository with the install file required for mavlink. First pull the updates:

cd ~/catkin_ws
git checkout master
git fetch --all
git reset --hard origin/master

Then reinstall mavros:

sudo apt-get remove ros-kinetic-mavlink
sudo apt install ./ros-kinetic-mavlink_2018.9.17-1_amd64.deb
sudo apt install ros-kinetic-mavros ros-kinetic-mavros-extras

from autonomous-drone.

150202029 avatar 150202029 commented on July 18, 2024

hi
Ekran Görüntüsü - 2020-02-03 23-22-31
@szebedy

from autonomous-drone.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.