Skip to content
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

geolib: datasets: warn when not installed; update install script; launch SIGINT when not installed #778

Merged
merged 19 commits into from
Aug 22, 2017

Conversation

TSC21
Copy link
Member

@TSC21 TSC21 commented Aug 20, 2017

No description provided.

@TSC21 TSC21 force-pushed the geolib_mandat branch 14 times, most recently from bda4a98 to 50f3677 Compare August 20, 2017 21:31
@TSC21 TSC21 closed this Aug 20, 2017
@TSC21 TSC21 reopened this Aug 20, 2017
@TSC21 TSC21 force-pushed the geolib_mandat branch 10 times, most recently from c0438d2 to 9c68469 Compare August 20, 2017 22:48
@TSC21 TSC21 force-pushed the geolib_mandat branch 2 times, most recently from e355777 to 8437678 Compare August 21, 2017 21:53
@TSC21 TSC21 force-pushed the geolib_mandat branch 2 times, most recently from 8935ef4 to 1cbe623 Compare August 21, 2017 23:37
@TSC21
Copy link
Member Author

TSC21 commented Aug 21, 2017

I'm going to leave the docker container update for another PR. This as is seems enough to fix travis and at the same time add the dataset load as mandatory. @vooon can you review please?

@TSC21 TSC21 requested a review from vooon August 21, 2017 23:48
@TSC21 TSC21 changed the title [WIP] geolib: warn when datasets not installed geolib: datasets: warn when not installed; update install script; launch SIGINT when not installed Aug 22, 2017
else()
message(STATUS "Magnetic Field model datasets found in: " ${GEOGRAPHICLIB_MAGNETIC_PATH_}/magnetic)
set(GEOGRAPHICLIB_MAGNETIC_PATH ${GEOGRAPHICLIB_MAGNETIC_PATH_}/magnetic)
endif()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO! Wrong! You should check in runtime. UAS or so should try to load needed datasets and responds error log if it fails.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong? Wrong why? Check the all PR and you will see that's also done. This is a check during build time that warns people that they basically did not fully followed the installation instructions. A SIGINT is launched when that happens. What I can also do is verbose the SIGINT with a info msg so that people run the install script. Besides that, this is perfectly acceptable IMO and doesn't harm anyone.

.travis.yml Outdated
@@ -26,7 +31,7 @@ before_install:
#- sudo sh -c "echo \"deb http://packages.ros.org/ros-shadow-fixed/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
# Update python 2.7 version
- sudo apt-add-repository ppa:fkrull/deadsnakes-python2.7 -y
- sudo apt-add-repository ppa:fkrull/deadsnakes -y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ppa deprecatead : use https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
Why do you need it btw ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problems in Travis. But thanks for the updated version

ROS_ERROR_STREAM("UAS: GeographicLib exception: " << e.what());
signal(SIGINT, term);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No! Why you set signal callback here? Just call ROS_ABORT().

Copy link
Member Author

@TSC21 TSC21 Aug 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I wasn't sure what was the best approach. I know that SIGINT can be intercepted besides allowing proper debugging. I was thinking that we could add the info on the SIGINT stating that the problem is due to not having the dataset installed. Though I suppose that can also be handled on the ROS_ERROR_STREAM above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that it not what you wrote in code.
Code:

  1. try to load egm96-5
  2. on error:
    1. Log error
    2. Set SIGINT signal handler. man signal

Copy link
Member

@vooon vooon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now lgtm.

@vooon vooon merged commit 881761d into mavlink:master Aug 22, 2017
@vooon vooon added this to the Version 0.20 milestone Aug 23, 2017
@TSC21 TSC21 deleted the geolib_mandat branch September 30, 2017 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants