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

msg: remove gencpp and genmsg submodules; remove gencpp imports #13572

Merged
merged 31 commits into from
Jan 13, 2020

Conversation

TSC21
Copy link
Member

@TSC21 TSC21 commented Nov 22, 2019

Describe problem solved by this pull request
After some verification, I noticed:

  1. We are not using gencpp for anything (!) - there was probably a reason it was added some years ago, but now it's just there, occupying space as an unused dependency and submodule;
  2. If we were using genmsg and gencpp from source because of lack of compatibility with other OS's, after some search I found that we do have genmsg available by pip: https://pypi.org/project/pyros-genmsg/. It just needs to be tested in other platforms, like Windows and MacOS.

Describe your solution
Completely remove the genmsg and gencpp submodules and all the places where gencpp was being imported (since it wasn't really being used).

@dagar
Copy link
Member

dagar commented Nov 22, 2019

Sounds good to me. Goodbye submodules!

@TSC21
Copy link
Member Author

TSC21 commented Nov 22, 2019

For this to build correctly, we are going to need to update the base bionic and xenial containers to install python-genmsg by apt. python3-genmsg is being installed on the ROS2 containers, since is being used by px4_ros_com to generate the micro-RTPS agent code, but I guess to make this compatible with Python 3 as well, and following the developments in #12809, the install of python3-genmsg should also be moved to the base containers.

@TSC21 TSC21 changed the title msg: remove gencpp and genmsh submodules; remove gencpp imports msg: remove gencpp and genmsg submodules; remove gencpp imports Nov 22, 2019
@julianoes
Copy link
Contributor

Tested on macOS, built fine after pip3 install --user empy pyros-genmsg.

@TSC21
Copy link
Member Author

TSC21 commented Nov 22, 2019

Tested on macOS, built fine after pip3 install --user empy pyros-genmsg.

Great stuff! Let's make sure we update the containers accordingly! @MaEtUgR can you do something about AppVeyor?

@TSC21
Copy link
Member Author

TSC21 commented Nov 22, 2019

@dagar are you able to update the MacOS side on CI? For now, pip2 install --user empy pyros-genmsg should be enough (as we are still moving to Python3). But you can always install it for both and it gets already solved.

@TSC21
Copy link
Member Author

TSC21 commented Nov 22, 2019

Containers to be updated in PX4/PX4-containers#213.

@TSC21 TSC21 requested a review from bkueng November 23, 2019 09:45
@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch 2 times, most recently from 9a367f3 to b281c9b Compare November 23, 2019 18:11
@TSC21
Copy link
Member Author

TSC21 commented Nov 23, 2019

I keep bumping into the same error as in #12809:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3356: ordinal not in range(128)

@julianoes do you know what might be causing this? I can't reproduce it locally (and I have the same Python version).

Quickly looking for the cause, this might be an encoding issue.

@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch from b51a0fb to 29db151 Compare November 23, 2019 18:27
@TSC21
Copy link
Member Author

TSC21 commented Nov 23, 2019

We might have to setup these on the base containers. As soon as I get a chance I will test it locally on the containers.

@TSC21
Copy link
Member Author

TSC21 commented Nov 24, 2019

@MaEtUgR is it possible for you to update the Windows CI here for the python genmsg dependency?

@bkueng
Copy link
Member

bkueng commented Nov 25, 2019

Can you improve the error outputs? I'm getting

python import error:  No module named 'genmsg'

Required python packages not installed.

On a Debian/Ubuntu system please run:

  sudo apt-get install python3-empy
  sudo pip3 install catkin_pkg

On MacOS please run:
  sudo pip3 install empy catkin_pkg

On Windows please run:
  easy_install empy catkin_pkg

Whereas pyros-genmsg is needed.

@TSC21
Copy link
Member Author

TSC21 commented Nov 25, 2019

Can you improve the error outputs? I'm getting

python import error:  No module named 'genmsg'

Required python packages not installed.

On a Debian/Ubuntu system please run:

  sudo apt-get install python3-empy
  sudo pip3 install catkin_pkg

On MacOS please run:
  sudo pip3 install empy catkin_pkg

On Windows please run:
  easy_install empy catkin_pkg

Whereas pyros-genmsg is needed.

Yes absolutely.

@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch from eea8756 to 0786bc5 Compare November 25, 2019 14:50
@TSC21
Copy link
Member Author

TSC21 commented Nov 25, 2019

PX4/PX4-containers#214 brings the fix for the decoding issues. Tested locally and on Jenkins. Just needs a container update now.

@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch from 0786bc5 to ccfc4b7 Compare November 29, 2019 09:56
@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch 3 times, most recently from aefe830 to d4b3425 Compare November 29, 2019 10:45
@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch 3 times, most recently from 9e23424 to 662edeb Compare January 13, 2020 16:51
@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch from 662edeb to e1b239b Compare January 13, 2020 16:56
@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch from ebc206e to ed253b9 Compare January 13, 2020 18:51
@TSC21 TSC21 force-pushed the cleanup/remove_genmsg_gencpp_submodules branch from ed253b9 to 413d3b9 Compare January 13, 2020 19:08
@TSC21
Copy link
Member Author

TSC21 commented Jan 13, 2020

@julianoes success!! Finally :D

@TSC21 TSC21 requested a review from dagar January 13, 2020 21:09
@TSC21 TSC21 requested a review from LorenzMeier January 13, 2020 21:12

On MacOS please run:
sudo pip install empy catkin_pkg
Copy link
Member

Choose a reason for hiding this comment

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

Have the docs been updated?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point. We'll check them.

@TSC21
Copy link
Member Author

TSC21 commented Jan 13, 2020

Let's bring this in and update the docs where needed.

@TSC21 TSC21 merged commit 4f362f5 into master Jan 13, 2020
@TSC21 TSC21 deleted the cleanup/remove_genmsg_gencpp_submodules branch January 13, 2020 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants