ROS package not found after catkin_make - package

I created a ROS workspace following the Wiki page from ROS. I also created a package using catkin_create_pkg under the workspace I just created.
Then, following the steps in ROS Wiki to build the package using catkin_make, after the package is built, I insert the command rospack find packagename, and my package is not found anymore.
Can anyone help me on this?

Have you followed this basic tutorial? You have to create the package in your workspace and have set properly your Bash file (in your home directory).
To permanently set your system, add these lines
# ROS settings
source <your_workspace_path>/catkin/devel/setup.bash
at the end of your ~/.bashrc. Then, restart the terminal, and retry. Please, be sure to modify these lines with your actual information, where I've put <your_workspace_path> (depends on where you have installed ROS and its workspace on your PC).
If this does not solve the problem, try rospack profile before rospack find <your_package_name>.

Related

ModuleNotFoundError in Spyder

I tried to import the biopython package in Spyder and got the error message:
ModuleNotFoundError: No module named 'biopython'
although biopython is installed.
I also checked the PYTHONPATH: there is a path set into the directory where the packages are stored.
Can somebody help? Did I miss something? Thanks for your help!
If you're using Anaconda, it's best to install all the packages you want from Anaconda if possible. You can check if a package is available with (e.g.):
conda search biopython
When I try that command it shows that biopython is available, so assuming you have access to the standard conda channels you should be able to get it this way.
Assuming you haven't already created a conda environment to work with, start by creating a new one with the packages you want to use:
conda create -n myenvname spyder biopython
where myenvname is the name you want to give the environment - call it whatever you like. If you want to use other packages as well, add their names to the end of this command. Then once the env is completed, activate it:
activate myenvname
or if this doesn't work, on Mac or Linux:
source activate myenvname
and start Spyder in this environment:
spyder
Each time you want to use this environment in future you will need to activate it first. You may also be able to do some of these tasks through the Anaconda Navigator or via Start menu shortcuts but the command line version will always work.
If there's a package you want that isn't available from conda but is available via pip, just use the pip command after creating and activating the environment.
If you are using Anaconda, a solution could be
conda install -c main biopython
following https://anaconda.org/main/biopython.
The official repository page helped me when I got your error message because numpy was not in place.

Trouble installing/using Atom packages on offline PC

I'm currently in the process of setting up my workspace on my company machine and have chosen Atom as my text editor of choice. The computer is not connected to the internet, so I will have to "manually" install packages. I've been having difficulties installing packages via usb transfer. I've copied and extracted packages to my ~/.atom/packages
The package I'm attempting to use (atom-beautify) shows up on the packages tab on the top of the editor. It also shows up under [Settings] -> [Packages].
When attempting to use the beautify I get the error message "Failed to activate the atom-beautify package" ... Cannot find module 'event-kit'
Also using Windows 10. Any help is greatly appreciated!
You can solve your problem. There are some way to solve your problem.I did not used win10, I am on win7.Yet you can try.
Paste atom-beautify to C:\Users\User.atom\packages and change pacakage.json
atom-beautify needs a dependency named bluebird, if you can try to add this to atom.
It step 1 or step 2 failed then goes to step 2,
Connecting your pc to internet run this command from your terminal: apm install atom-beautify
Source: https://github.com/Glavin001/atom-beautify/issues/879#issuecomment-218753674
Safest bet with installing atom packages offline is to install it on another online PC and then copy all contents from your packages location to offline PC.

Error arose when using Pkg.add() in Julia

I have a problem when trying to add a package in the terminal using Pkg.add, the terminal gives me the following error message:
fatal:your current branch 'master' does not have any commits yet
Error: failed process: Process(`git' --git-dir=````)
How do I fix it?
I've had the same issue with Gadfly. Installation failed and I couldn't load nor reinstall the package.
After looking at the documentation.
Turns out there is a cache folder (with the same name as the package) hidden in Users\my_username\.julia\v0.4\.cache\ I removed this folder and the package installed fine from Julia running Pkg.add("Gadfly").
Try removing the folder and install the package again.
Please give more information about where this package comes from. Github? Your hard drive? A zip file?
If this is one of your packages, just create a commit.
git add .
git commit -m 'First commit'
This should work.

How extract the package source into the some other directory in buildroot

Here my package is net-snmp.
Here is the task : Addition of Net-SNMP Source directory at path personal/apps/snmp/
Requirement is that it should download from website if there is change in version name and it should patch , configure and build soruce.
Hence, for that we need to configure Config.in and netsnmp.mk files in build/package/netsnmp in order to fulfill this requirement.
By adding following configuration in netsnmp.mk
NETSNMP_VERSION = 5.7.2.1
NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
NETSNMP_SITE = http://www.sourceforge.net/projects/net-snmp/files/net-snmp/$(NETSNMP_VERSION)
We can download the latest net-snmp tar ball which will be downloaded in dl/ folder in buildroot.
From here it will untar in build/output/build and will patch configure and build. After that it will build the executable at appropriate location inside target folder.
Here the issue is I want netsnmp source code to be at personal/apps/snmp folder which seems to be problematic and can edit the source in path personal/apps/snmp/ and configure build from here.
Any help and suggestion will be appreciated.
There is already a netsmp package in Buildroot. Why do you want to create another one?
Also, the Buildroot community is going to be much more reactive if you ask questions on the project's mailing list.

Install Packages (for dummies)

I know there's a lot of information on here about installing python packages, but I'm quite new to python and I think I need a more "for dummies" level of help.
I was trying to install openpyxl for which as far as I can tell I need easy_install, for which, as far as I can tell, I need setuptools. I tried running the code provided here https://pypi.python.org/pypi/setuptools which is supposed to download and install setuptools (and according to some sites, easy_install aswell?) - it runs successfully, but help(modules) doesn't show setuptools or easy_install as modules, I have no idea whats installed and what isn't, or how I'm supposed to install any of it!
Essentially I'm very confused, very frustrated and really need someone to talk me through (in idiot-speak) what I'm supposed to do.
Thankyou!
We all start somewhere, I was there two weeks ago.
I'll assume you're using Python2. I believe Distribute and Pip are recommended for Python3 (which I will be using as examples). I will also assume you are on Windows.
First, python needs to be registered to Path. To check if this has been done automatically, open a command prompt (start -> programs -> accessories), and type 'python', then enter. If it returns the version number, etc, skip down a bit. If it throws an error, you need to add Python to Path.
Adding Python to Path
To add Python to Path on a Windows computer, go to:
Control Panel -> System -> Advanced Settings -> Environment Settings -> System Variables
Scroll down to select path, then click edit. Copy the entire line to a text document, and add your install directory for Python.exe (and the scripts folder) using ';' as a delimiter between different directories. Copy this back to Path and save. (Additionally close your command prompt window to reset it.)
For my Windows 7 machine, I added:
;C:\Python33;C:\Python33\scripts;
Take care when editing this file. There are many videos out there describing this in detail if you feel unsure about changing this.
Installing Modules (Such as setup_tools)
Once Python is registered in the Path file, download and unzip setup_tools to a folder within your Python install directory called 'modules'. I use ExtractNow to unzip, as it will unzip twice (as required) automatically.
Open a command prompt window again, and direct it to change directories by typing
cd [directory for module you want to install]
On my computer, this would be
cd C:\Python33\modules\distribute-0.6.40
Again, I use distribute, rather than setup_tools as it sounds like you need would for Python2. Simply use the appropriate directory. Press enter to change the directory.
Once you've entered this and it shows a changed directory, type:
python setup.py install
This indicates that you want to use the program python to use the setup.py file in the specified folder to install the module. This should be successful, and will write many lines of code.
If you want to install other modules, you would install them in a similar way. Python would automatically use setup_tools on your computer to finish each install.
Remember to import at the start of your script when using them to code:
import [module]
Happy Programming!

Resources