-
Notifications
You must be signed in to change notification settings - Fork 983
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
Conversation
bda4a98
to
50f3677
Compare
c0438d2
to
9c68469
Compare
e355777
to
8437678
Compare
8935ef4
to
1cbe623
Compare
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? |
else() | ||
message(STATUS "Magnetic Field model datasets found in: " ${GEOGRAPHICLIB_MAGNETIC_PATH_}/magnetic) | ||
set(GEOGRAPHICLIB_MAGNETIC_PATH ${GEOGRAPHICLIB_MAGNETIC_PATH_}/magnetic) | ||
endif() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
mavros/src/lib/uas_data.cpp
Outdated
ROS_ERROR_STREAM("UAS: GeographicLib exception: " << e.what()); | ||
signal(SIGINT, term); | ||
} |
There was a problem hiding this comment.
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()
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
- try to load egm96-5
- on error:
- Log error
- Set SIGINT signal handler.
man signal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now lgtm.
No description provided.