Closed mamueluth closed 2 years ago
When I don't setup the rtw permanently and start executing setup-ros-workspace
, I get following error messages:
cp: cannot stat '/home/deniss/.ros_team_ws_rc': No such file or directory
sed: can't read /home/deniss/.ros_team_ws_rc: No such file or directory
sed: can't read /home/deniss/.ros_team_ws_rc: No such file or directory
Should we first check if this files exist?
I see that this is a bit out-of-scope… Nevertheless, we should do a simple error management. For example, if RTW is set to be automatically set up, then we should probably not create a new workspace. Easiest would be to check if there is source ...
line in .bashrc
if not, then we return error.
When is execute source ros_team_workspace/setup.bash
multiple times, then I get output:
bash: positive_answers: readonly variable
bash: negative_answers: readonly variable
bash: rtw_accepted_answers: readonly variable
bash: rtw_supported_ros_distributions: readonly variable
This could be probably avoided having simple check if variable exist already. This is not a critical issue, but easy to solve, I think.
Note: this output also happens in some other situations, like when creating a new workspace.
Should we add a prefix to commands like setup-auto-sourcing
, for example, to be rtw_setup-auto-sourcing
? What do you think?
When trying to auto-source a workspace when .ros_team_ws_rc
file exists, I get the following error:
Copying .ros_team_ws_rc to your home folder.
ls: cannot access '.ros_team_ws_rc*': No such file or directory
.ros_team_ws_rc already exists. Moved it to .ros_team_ws_rc.bkp-0.
mv: cannot stat '.ros_team_ws_rc': No such file or directory
Error: Could not create a copy of already existing .ros_team_ws_rc. Please rename this file and run script again.
/home/deniss/workspace/ros_team_workspace/scripts/../scripts/setup_auto_sourcing.bash: line 35: return: can only `return' from a function or sourced script
Nevertheless, the result looks fine.
After creating a new workspace, when sourcing it I get the following error:
bash: /home/deniss/workspace/ros_team_workspace/scripts/../ros_ws_rolling/src/ros_team_workspace/scripts/environment/setup.bash: No such file or directory
[x] Issue Nr. 1
- Quick fix for this, maybe needs evaluation. Currently:
- if file does not exist, we create new one (This is no regular .ros_team_ws_rc file) and does not qualify as one.
- if file exists, we update as usual
[x] Issue Nr. 2
- Added conditional assignment of variables
[x] Issue Nr. 3
- should be done with the CLI I am working on right now.
[x] Issue Nr. 4
- fixed it (used rtw_file instead of rtw_file_location, this was a mistake)
[x] Issue Nr. 5
- fixed to be correct path. Missed this previously
This works fine now!
RTW should now work regardless of where it was cloned. Important: The .ros_team_ws_rc has changed, DEFAULT_ROS_DISTRO="rolling" DEFAULT_ROS_VERSION=2 are not needed anymore, an alternative path location system was introduced
Please make a qick check if working correctly!