Open dr563105 opened 3 years ago
@dr563105 Thanks for your interest in my script. Thanks a lot for bringing this to my attention. I haven't tested the script on Mac/ ROS2 or the zsh shell. I am therefore not aware of the problems that will occur when using the script in this new environment. I was hoping the ROS team solved the Conda conflicts in version 2, but apparently, they are still present. This is unfortunate because a big part of the scientific community uses Conda as their package manager.
I am currently working on my Master Thesis and am therefore a bit short on time. However, I will try to perform some tests this weekend to discuss a possible solution. Judging from this StackOverflow post the difference between the two shells is small, so it might not be had to get it to work.
I was hoping the ROS team solved the Conda conflicts in version 2, but apparently, they are still present.
I can't say for sure that it doesn't work. It might just be me. Since the M1 Mac ARM architecture is new, I built it from source and the ROS2 workspace is in the home directory.
I am currently working on my Master Thesis and am therefore a bit short on time.
I know how it is. I'm not good at scripting. Otherwise I would myself try to fix it.
If you need more detailed steps to reproduce the issue, let me know please.
@dr563105 Just a quick heads up. The Robostaxk team just released the ros-noetic desktop version. If ros-noetic contains all the packages you need, it might be the easiest way to use ROS under Conda (see https://medium.com/robostack/cross-platform-conda-packages-for-ros-fa1974fd1de3). Their packages are used under the hood for initiating ROS inside the wrapper. If it does not contain all the packages you need and want to use the desktop ROS version while also having Coda installed, the wrapper is required. I planned some time to take a look at the. Mac compatibility of the wrapper next week.
Thanks. I became aware of Robostack release when I was looking for help with conda and ROS. Unfortunately for now my focus is ROS2.
Though it might be tedious, I'm planning to install tensorflow outside conda env.
I planned some time to take a look at the. Mac compatibility of the wrapper next week.
no problem. Take your time.
@dr563105 I quickly looked at your problem and the first conclusion I found is that the install.sh
script does not work for the zsh shell as it should install the workaround inside the .zshrc
file instead of the .bashrc
file. I think the easiest way to solve this is to create a new zsh branch and update the install script. After that, we can replace the bash commands that are not available in zsh with equivalent commands. Did you already look at which commands besides dirname
should be replaced?
@dr563105 I fixed the dirname
issue by replacing it with a zsh equivalent. After this however other errors greeted me. I, unfortunately, do not have enough time to do a full translation of the warpper to the zsh shell. Your welcome to create a pull request if you steel need this feature.
Hey! Thanks for the update. Apart from initial renaming and manually adding entries to .zprofile, I don't think I looked further. The main hurdle is learning to script. Otherwise I would attempt myself. I also don't have time now but I will try in the next weeks if I can manage something. I will keep you updated if I find any.
@dr563105 The script is a bit over-complicated on some parts since I tried to make it compatible with multiple bash and Conda version. I think there are some parts I can simplify so that it is easier to understand. Apart from that, I am happy to explain any parts of the script that are unclear and debug together with you if you get stuck.
Alright. Your help will be welcome. I will try my best in the coming weeks.
@dr563105 Don't feel pressured to complete this feature, but please feel free to ask me anything if you decide you want to. I will clean up the code a bit starting next week. Then we know for sure that there is no redundant code.
Hi!
Thanks for this wrapper. I became aware of this wrapper from one of the ROS Answers posts when I was looking for help with conda and ROS.
I have been running into a few problems. I would appreciate any help you can provide.
System: Mac OS Big Sur 11.2. M1 ARM macbook. Shell:
echo $SHELL
- /bin/zsh Conda version: Miniforge, v4.9.2 Python version inside conda env: 3.8 ROS version and distribution: ROS2 Foxy. Workspace is inside $HOME directory.Since the shell is zsh and the code uses bash, I simply changed the occurrences of
bash
tozsh
in scriptsinstall.sh
andros_conda_wrapper_rc
. Please correct me if it is not as simple as renaming.Note: I have already initialised the Conda environment and added the
conda init
command to.zshrc
.My .zshrc now has these lines -
And instead of
.zprofile
,.bash_profile
has these lines -Upon opening a new shell, I get this -
In fact, some general commands don't work -
Since the script fails here,
--ros-wrapper
argument doesn't work. The consequent steps to activate and initialise with a conda env are also unsuccessful.Can you please help?
Also, in my limited hacking of your script I saw that wrapper works even with ROS2. Is this correct? I use ROS2 Foxy, built from source as instructed here. If not, what further steps should I need to make it work?
Thank you.