ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Adding a new package to ROS workspace

asked 2023-01-09 10:19:45 -0500

sscattered gravatar image

updated 2023-01-10 05:11:42 -0500

Hi,

I have this robot with ROS kinetic version. I need to run my python code with rosrun, I have already created a new package, but I'm not sure if doing catkin_make will destabilize the things. The thing is this robot is in my office and we ordered it from overseas so if any issue happen and it cease to work, it will be troublesome.

I have already did few tests on VM installing ROS and few things. The python script I have is just subscribing to /map and relaying the data through a webserver. All works under my VM

Please tell me if doing catkin_make will broke things or it is totally safe

PS: Robot is pre-configured, so once I turn on the ROBOT it will autorun and etc... That's why I'm afraid of doing changes

edit retag flag offensive close merge delete

Comments

2

I'm not sure if doing catkin_make will destabilize the things.

You should create a new workspace and install all the packages in this newly created workspace. Later, you can invoke catkin_make in this workspace. Even if some package shows an error, you can delete this workspace and create a new one.

ravijoshi gravatar image ravijoshi  ( 2023-01-10 03:15:07 -0500 )edit

@ravjoshi thank you! will try that way

sscattered gravatar image sscattered  ( 2023-01-13 00:00:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-01-10 07:40:26 -0500

ljaniec gravatar image

The best way is already suggested by @ravijoshi (second catkin_ws with copy of the packages).

You shouldn't source the original workspace (check the .bashrc and other places where autostart with scripted sourcing can be), just copy, modify & build the second workspace, then source it.

Part of the installed packages can be binary, you should also check it (sudo apt list | grep ros).

In general, even if your modification would break something (software, not hardware...), a company that respects itself and its customers should have step-by-step instructions on how to set everything up again :) Please check the documentation, instructions/tutorials, reach out to the support etc. I hope these recovery steps will be described somewhere.

edit flag offensive delete link more

Comments

Thank you! I will first start from cloning the original workspace and see.

sscattered gravatar image sscattered  ( 2023-01-13 00:00:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-01-09 10:18:32 -0500

Seen: 61 times

Last updated: Jan 10 '23