"ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py" results in package not found - simulation

These are the commands that were used:
$ source /opt/ros/foxy/setup.bash
ROS_DISTRO was set to 'noetic' before. Please make sure that the environment does not mix paths from different distributions.
$ export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3_simulations/turtlebot3_gazebo/models
$ export TURTLEBOT3_MODEL=burger
$ ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
Package 'turtlebot3_gazebo' not found: "package 'turtlebot3_gazebo' not found, searching: ['/opt/ros/foxy']"

Is it possible that a sub-directory is missing in the path?
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models
Alternatively, you may use the following if you do not require a workspace:
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/foxy/share/turtlebot3_gazebo/models

Related

Cannot do "make eclipse-project" in an exsisting ROS package

When I create a new ROS package using:
$ roscreate-pkg test std_msgs rospy roscpp
and then I proceed to it, typing:
$ make eclipse-project
Everything is OK.
But when I roscd into an existing ROS package and type the above command, it returns :
make: *** No rule to make target `eclipse-project'. Stop.
Is it because the package isn't created by roscreate-pkg?
did you follow the steps here ? Ros Wiki on IDSs
I know the cause for make having no rule is when the rule isn't found in a Makefile.
I was having the same problem with my project and found that it had no Makefile.
Your question gave me the insight to run roscreate-pkg and voilĂ  that folder had a Makefile. The entire contents are:
include $(shell rospack find mk)/cmake.mk
I was able to solve the same problem by having a Makefile in my project with the same content. I did it by copying the Makefile from the dummy project I created via the following commands:
$ roscreate-pkg dummy std_msgs rospy roscpp
$ cp src/dummy/Makefile src/my-package/Makefile

How to determine dependencies of recipes in yocto?

I want to add gedit to the the image. But i am not able to find the dependencies of gedit package. How to find the dependencies (DEPENDS) in yocto.
You can use the following command which opens up a Dependency explorer that displays dependencies on the packages:
bitbake -g recipe-name -u depexp
or bitbake -g gedit -u depexp, in your case.
On pyro and later use:
bitbake -g recipe-name -u taskexp
Note: this command needs python-gtk2 installed.
You can also use Toaster, which is a web UI that collects information about what you build, including dependencies. This video shows the dependency information provided:
https://www.youtube.com/watch?v=x-6dx4huNnw
Details on how to set up and use Toaster at
https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html
The list of packages installed in your image is stored in the manifest file (besides of build history which is already mentioned).
Content of the manifest file looks like:
alsa-conf cortexa7hf-neon-vfpv4 1.1.2-r0.1
alsa-conf-base cortexa7hf-neon-vfpv4 1.1.2-r0.1
alsa-lib cortexa7hf-neon-vfpv4 1.1.2-r0.1
alsa-states cortexa7hf-neon-vfpv4 0.2.0-r5.1
alsa-utils-alsactl cortexa7hf-neon-vfpv4 1.1.2-r0.5
alsa-utils-alsamixer cortexa7hf-neon-vfpv4 1.1.2-r0.5
...
The list consists of the package name, architecture and a version.
That manifest is located in the deploy directory (i.e. deploy/images/${MACHINE}/). Here as an example of the directory listing (there are target images and the manifest file)
example-image-genericx86.ext3
example-image-genericx86.manifest
example-image-genericx86.tar.bz2

Solaris package upgrade

I'm having a lot of trouble wrapping my head around how Solaris 11 does packaging. I understand that there is a yum type packaging approach, but I would expect there to be a rpm -i and rpm -U approach that allows a package to be delivered and then installed or upgrade.
For now I have tracked down how to make a package, ie pkgmk and pkgtrans. Given this I can create a "foo_1.0.pkg" file that can be installed like this:
pkgadd -d foo_1.0.pkg
However I can not figure out how to upgrade this package with "foo_2.0.pkg":
root#hostname # pkgadd -d foo_2.0.pkg
The following packages are available:
1 foo foo
(x86) private_build
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <foo> from </root/foo_2.0.pkg>
foo(x86) private_build
Current administration requires that a unique instance of the <foo>
package be created. However, the maximum number of instances of the
package which may be supported at one time on the same system has
already been met.
No changes were made to the system.
What am I doing wrong? It would appear that i should use pkg update, but this seems to imply that I need to release my pkg in a repo.
First, you aren't using Solaris 11 packaging (IPS) but the legacy SVR4 packaging.
With the latter, you cannot upgrade a custom package. The only way is then simply to remove the old package and install the newer one, which is what rpm -U is doing under the hood anyway.
pkgrm foo
pkgadd -d foo_2.0.pkg foo
I had the same problem, but I was able to workaround it by passing a config file into the cmd. This is especially useful in a script when used with the "echo |" as it bypasses the confirmation prompt as well. The config file overwrites the default install properties which are located in a file here: /var/sadm/install/admin/default. The key is the instance=overwrite line. I changed some of the others as well, to avoid any other prompts that may come up. As an alternate solution you can change the default file directly and not have to reference the additional config file.
with myprog1.0 (or 2.0) already installed run the following command.
echo | pkgadd -a /opt/myprog/install.conf -d myprog2.0
contents of /opt/myprog/install.conf file:
mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=ask
setuid=ask
conflict=nocheck
action=nocheck
networktimeout=60
networkretries=3
authentication=quit
keystore=/var/sadm/security
proxy=
$UPDATE
This variable does not exist under most installation environments. If it does exist (with the value yes), it means that a PKG with the same name, version and architecture is already installed on the system or that the installing PKG will overwrite an installed PKG. The original BASEDIR is then used.
So, this variable you can use in preinstall or postinstall script for any updation.

Can you run pychecker from virtualenv?

I want to do code analysis with pychecker but when it imports python code it doesn't use the packages from virtualenv, it uses the system wide one and the import fail.
Is there a way to install pychecker in a virtualenv or at least get it to just import the packages from the virtualenv?
Set your $PYTHONPATH environmental variable to the site-packages directory.
For me, pychecker was not able to find the configobj module. Since I use zsh (bash with lots of bells and whistles), I ran:
> find ~/venv-ops -name configobj.py
/Users/doug/venv-ops/lib/python2.7/site-packages/configobj.py
> export PYTHONPATH=/Users/doug/venv-ops/lib/python2.7/site-packages
and then pycheck worked fine.

Using gtags for gtk headers and my own project

I have a gtk project and I want to use gtags for my project. I also would like to use gtags for the external libraries, in my case gtk. I tried:
find /usr/include/gtk-2.0 -name "*.h" > gtk_headers
gtags -f gtk_headers
Unfortunately, I get a segmentation fault here (using Ubuntu 12.04)
Any ideas how to get this work? (I am also happy with a solution with ctags or etags).
Please try this:
$ (cd /usr/include/gtk-2.0; gtags) # make tag in the library project
$ gtags # make tag in your project
$ GTAGSLIBPATH=/usr/include/gtk-2.0; export GTAGSLIBPATH
$ global -x xxx
If 'xxx' exists in your project, global show it.
Otherwise, if 'xxx' exists in the library projects,
global show it.
To show both of them, please try this:
$ GTAGSTHROUGH=; export GTAGSTHROUGH
If you have many libraries then please specify them like PATH environment
variable.
$ GTAGSLIBPATH=/usr/src/lib:/usr/include/gtk-2.0; export GTAGSLIBPATH
Good luck!