Ask Your Question
0

How to create a ROS snap correctly?

asked 2020-10-26 07:12:50 -0500

Py gravatar image

updated 2020-10-26 12:08:46 -0500

I am following the tutorial at https://snapcraft.io/#ros to create a Ubuntu Snap from a ROS package on Github. This all goes well until running the snapcraftcommand, from https://snapcraft.io/first-snap/ros/l..., which results in the following error:

ERROR: no rosdep rule for 'roscpp_serialization'
Package 'roscpp_serialization' isn't a valid system dependency. Did you forget to add it to catkin-packages? If not, add the Ubuntu package containing it to stage-packages until you can get it into the rosdep database.

I'm assuming this means I should change something in the .yaml file but I am unsure exactly how this should look. Could anyone offer an example or any guidance?

Here's the .yaml file from the tutorial:

name: test-ros-talker-listener-test
 version: '0.1'
 summary: ROS Talker/Listener Example
 description: |
  This example launches a ROS talker and listener.
 confinement: devmode
 base: core18
 parts:
  ros-tutorials:
    plugin: catkin
    source: https://github.com/ros/ros_tutorials.git
    source-branch: melodic-devel
    source-space: roscpp_tutorials/

 apps:
  test-ros-talker-listener-test:
    command: roslaunch roscpp_tutorials talker_listener.launch
edit retag flag offensive close merge delete

Comments

It would be helpful to see the snapcraft.yaml you're using so we can duplicate your results. That tutorial seems to works fine, but it sounds like you're trying to snap something else, correct?

kyrofa gravatar image kyrofa  ( 2020-10-26 11:02:57 -0500 )edit

Just added this :)

Py gravatar image Py  ( 2020-10-26 12:08:57 -0500 )edit
1

Wait, that IS the tutorial, no? I just built that and it worked fine. Can you add details regarding which OS/version you're using, as well as how you installed snapcraft and its version?

kyrofa gravatar image kyrofa  ( 2020-10-26 13:15:47 -0500 )edit

Yes that's right. See answer :)

Py gravatar image Py  ( 2020-10-27 04:05:37 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-27 04:06:36 -0500

Py gravatar image

I'm running Ubuntu 18.04.5 and the Snapcraft was version is 2.43.1+18.4. To me this looked strange so I removed it, although Snapcraft version 4.3 remained on the system which did work. Problem solved!

edit flag offensive delete link more

Comments

1

You must have had both the snapcraft snap as well as the snapcraft deb installed. The deb is old and not supported anymore, so removing it and using the snap was the right thing to do.

kyrofa gravatar image kyrofa  ( 2020-10-27 09:56:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-10-26 07:12:50 -0500

Seen: 158 times

Last updated: Oct 27 '20