Hey I made a autonomous car ROS project. I have some scripts such as object detection and lane detection. How can I run these scripts with just one file. Are these should be .sh file or .launch file?
If they’re all ros nodes they should be launched via roslaunch. More documentation can be found here. You should only be using shell scripts for things outside of the direct ROS ecosystem. For example, if you wanted to actually run the roslaunch commands when a computer boots up; e.g. through systemd.
Related
I was wondering If any one could help me to understand the difference of python virtual environment and docker container.
So I would like to have environment for each tools isolating from each other to avoid dependency conflict for example: use of different version of same dependency causing error in one of the tool because one tool need older version and other one requires newer version.
I’m tested out python venv but not sure if it’s the right one I should use for the issue I just explained or docker is something I should be using for my situation?.
Particularly for day-to-day development, prefer a virtual environment if it's practical.
Virtual environment
Docker
Works with native tools; can just run python myscript.py
Requires Docker-specific setup
Every IDE and editor works fine with it
Requires Docker-specific IDE support
Can just open() data files with no special setup
Can't access data files without Docker-specific mount setup
Immediately re-run code after editing it
Re docker build image or use Docker-specific mount setup
Uses Python installation from host
Use any single specific version of Python
Isolated Python library tree
Isolated Python library tree
Uses host version of C library dependencies
Isolated C library dependencies
A virtual environment acts like a normal Python installation in an alternate path. You don't need to do special things to make your local code or data files available; you can just run your script directly or via your IDE. The one downside is that you're limited to what your host OS's package manager makes available for Python versions and C library dependencies.
A Docker container contains the filesystem of a complete OS, including a completely isolated Python installation. It can be a good match if you need a very specific version of Python or if you need host OS dependencies that are tricky to install. It can also be a good match if you're looking for a production-oriented deployment setup that doesn't specifically depend on installing things on to the target system. But, Docker by design makes it hard to access your host files; it is not a great match for a live development environment or especially for one-off scripts that read and write host files.
The other consideration here is, if you use the standard Python packaging tools, it's straightforward to run your program in a virtual environment, and converting that to a Docker image is almost boilerplate. Starting from Docker can make it tricky to go back the other way, and I see some setups around SO that can only be run via Docker; if they were restructured to use a standard setup.cfg/requirements.txt installation setup they would not require Docker but could still be used with it.
we are currently working on Pepper 2.5.10 and ROS Kinetic. We want to run ROS with our own applications inside the robot. We have tried some of the ROS projects with Pepper robot, but all of the applications run in our computer. We are thinking to install and run ROS inside of Pepper, do you think this is a practical way to do or do you have any other suggestion for this task.
Thanks for your suggestions.
You can check these links for cross compilation (compile on you pc and send it to Pepper):
pepper_ros_compiled
pepper_ros_compilation
or this one to use gentoo prefix (install useful tools like catkin_make or emerge on the pepper's head so compile directly on the robot) :
sbre_robot_ros_gentoo_prefix
I'm currently building a Docker container that contains all the libraries needed for deployment of our app on a test machine, such as, for example, OpenCV 3.3 built with CUDA 9.
So, on a clean minimal OS install we can download the container and fire up our app in the desired environment, which is as I understand it one of the main reasons to use Docker.
So, after a while we decide to do our tests on the bare metal without the Docker file system, etc, in the way. Can we somehow replay the Dockerfile commands or image command history to run the apt-get, etc of not just the current package, but all FROM packages that are not yet installed on the raw environment?
I have Erlang and Elixir installed on my thumb drive. The launcher for Elixir is a Windows Batch file rather than a standalone executable.
One of the computers that I use regularly for school blocks the command prompt, but Erlang runs without command prompt, so I am able to use Erlang on the school computer.
I was wondering if I could run Elixir manually or potentially with PowerShell, so that I could code at school.
If you look at the bottom of the batch file you'll see that elixir.bat is just building up an argument string to use when invoking the Erlang executable. You can just build the argument string by hand, and if you launch Erlang correctly you'll be in Elixir-land.
Alternatively, if you can run any executable, maybe you should try putting a copy of PowerShell on your thumb drive.
I have Python 2.7 installed in "C:\Python27". Now I run 1st demo of Python4delphi with D7, which somehow uses my Py2.7 install folder. If I rename Python folder, demo can't run (without error message). I didn't change properties of a demo form.
What part/file does py4delphi use from my Python folder?
python4delphi is a loose wrapper around the Python API and as such relies on a functioning Python installation. Typically on Windows this comprises at least the following:
The main Python directory. On your system this is C:\Python27.
The Python DLL which is python27.dll and lives in your system directory.
Registry settings that indicate where your Python directory is installed.
When you rename the Python directory, the registry settings refer to a location that no longer exists. And so the failure you observe is entirely to be expected.
Perhaps you are trying to work out how to deploy your application in a self-contained way without requiring an external dependency on a Python installation. If so, then I suggest you look in to one of the portable Python distributions. You may need to adapt python4delphi a little to find the Python DLL which will be located under your application's directory. But that should be all that's needed. Take care of the licensing issues too if you do distribute Python with your application.