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

Detectcone cleanup #3

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Detectcone cleanup #3

wants to merge 16 commits into from

Conversation

arbulgazar
Copy link
Member

@arbulgazar arbulgazar commented Oct 15, 2018

  • Removes unnacisaritly files
  • Improves structure
  • Adds automatic downloads of cluon and eigen lib
  • Updates for the use of cluon-v114

* Removes unused cluons
* Removes static dependancy on Eigen, download fresh from git
* Moves header files to include dir
Updates to latest cluon-v114
Copy link

@chrberger chrberger left a comment

Choose a reason for hiding this comment

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

The file https://github.com/chalmersfsd/cfsd18-perception-detectcone/blob/detectcone_cleanup/docker-compose.yml contains:

  • a specific user local path
  • the use of libcluon's POSIX shared memory implementation (which is faster than libcluon's SystemV IPC's shared memory implementation); the consequence, though, is that all microservices that belong to a shared memory processing chain (i.e., producers, consumers) must be using the same Docker base image (i.e., all must use Alpine Linux or all must use Ubuntu); mixing different Docker base images result in a not working processing chain
  • the file model is empty
  • the README.md file must be updated to contain information how the service is supposed to be used
  • does Travis still complete successfully?
  • there is no valid test case: https://github.com/chalmersfsd/cfsd18-perception-detectcone/blob/detectcone_cleanup/test/tests-cfsd18-perception-detectcone.cpp

CMakeLists.txt Outdated
@@ -55,19 +55,21 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
################################################################################
# Extract cluon-msc from cluon-complete.hpp.

execute_process(COMMAND wget -P ${CLUON_PATH} https://raw.githubusercontent.com/chrberger/libcluon/gh-pages/headeronly/${CLUON_COMPLETE})

Choose a reason for hiding this comment

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

@arbulgazar Is this line executed once or on any build?

Copy link
Member Author

Choose a reason for hiding this comment

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

@chrberger yes, executed on every build, but if the file is already there it is not downloaded again. Should I make this check explicitly?

Choose a reason for hiding this comment

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

The issue might be that if you want to build when you only have the repository at hand and no Internet connection, this step might fail?

Copy link
Member Author

Choose a reason for hiding this comment

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

Regardless - will add an explicit check, will be cleaner.

Copy link
Member

Choose a reason for hiding this comment

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

If you run this outside of the docker, e.g. natively, it will clutter the repository.




const double PI = 3.14159265;

Choose a reason for hiding this comment

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

@arbulgazar We should use the constant provided in #include (M_PI)

Copy link
Member Author

Choose a reason for hiding this comment

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

What about DEG2RAD and RAD2DEG?

Choose a reason for hiding this comment

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

Should be adjusted in the same way (including constexpr to let the compile provide these constants even during compile time for further optimizations)

Copy link
Member

@bjornborg bjornborg left a comment

Choose a reason for hiding this comment

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

I think it would be nice with added

  • read me with pictures or gif showing the function
  • usecase showcasing the functionality with data
  • update the travis script

things to be fixed

  • Dockerfile

And before we merge the PR, we should also make a version release to highlight that this is latest from cfsd18 @ZiweiHuang94 .

@@ -20,8 +20,8 @@ project(cfsd18-perception-detectcone)
################################################################################
Copy link
Member

Choose a reason for hiding this comment

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

You might want to change the header author to Cfsd instead of Christian :D @chrberger .

Choose a reason for hiding this comment

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

Yes, please :-)

CMakeLists.txt Outdated
@@ -55,19 +55,21 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
################################################################################
# Extract cluon-msc from cluon-complete.hpp.

execute_process(COMMAND wget -P ${CLUON_PATH} https://raw.githubusercontent.com/chrberger/libcluon/gh-pages/headeronly/${CLUON_COMPLETE})
Copy link
Member

Choose a reason for hiding this comment

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

If you run this outside of the docker, e.g. natively, it will clutter the repository.

@bjornborg
Copy link
Member

Is it possible to use alpine as deployment base image on arch @chrberger ?

@bjornborg
Copy link
Member

bjornborg commented Oct 30, 2018

Left to do:

  • Update travis script
  • Update version control
  • Introduce unit tests for the module

@chrberger
Copy link

@bjornborg "Is it possible to use Alpine?"

Yes, when the following constraints are met:
a) the producing microservice that is giving us the image via a shared memory is also Alpine
b) when the producing microservice is not Alpine but the environment variable CLUON_SHAREDMEMORY_POSIX is either not set or set to 0 (cf. here: https://github.com/chrberger/libcluon/blob/master/libcluon/src/SharedMemory.cpp#L59-L61).

Reason: When the producer is non-Alpine and the receiver (ie., this microservice) is Alpine, the C-libraries are incompatible and hence, are not allowing using the fast POSIX shared memory implementation but only the (slightly) slower SysV IPC implementation.

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.

6 participants