Catkin workspaces, packages “built from scratch”, builds vs source-files, interoperability in builds.
Hello,
I picked up ROS around Christmas, and I’m struggling with some core concepts here. I’ve read all tutorials, multiple times, so please don’t just reference me to one of those…
When I follow a tutorial I will most likely end up with ng a workspace, add a package or even “create one”*; before making the catkin workspace.
Now I can roscore, rosrun and listnodes at my heart’s desire. Everything work’s and I’m having a good time. Then, I see I can extend on the previous, and in a matter of minutes I am no longer having a good time.
Now I am making new workspaces, adding packages, deleting packages, by hand and by commandline, really messing everything up big time.
I’ve attempted to define the core of my problems (Please forgive my noobishness, I’ve barely used cmake before and I wrote my first code in 2015) :
When first initializing and making some package or set of packages: 1) What is the correct way of adding/removing packages from a workspace? 2) Should always dependencies be listed to create a package (catkin_create_pkg package_name_pkg rospy rviz etc); before adding the “src” content of the package? 3) Is there any real catch (for a newb) to overlay the workspace with echo ~/source --- bashrc ?
When the initial workspace is up and running:
1) Can I just add, i.e a launch file, without doing anything more/building something?
2) If I did something wrong, maybe write xviz instead of rviz, how can I fix this? Do I have to re-initialize the whole package?
When I want to extend the made workspace with an additional package (my main issue): 1) When downloading a package from the web, do you always have to make it with catkin before it can be used? 1.1)If not, how can I tell if I can just use the script after placing it in the folder, versus when I have to remake/update something? 2) Is there a difference between how packages work? Like; could I download the built package at one site, while another site provided me with the source-files that had to be built?
In general, is it recommended to add more new packages, or to edit the one(s) one already has in place? (Not talking large-scale teamwork, but for i.e one dedicated and experienced individual creating something).
Bonus Q: 1)) When multiple device are supposed to interact – they would all need the same catkin workspace? Would every device compile it’s own in full?
Sorry I have a hard time to really express what I am struggling with. I would deeply appreciate any kind of general (basic) discussion around all related topics, so please don’t try to be short