Drake noob here.
I tried running the drake_visualizer and geometry_inspector with my own ROS generated URDF that depicts and experimental setup with two UR10s. This throws two errors
PackageMap is not able to resolve certain mesh files of extension *.STL and *.DAE. This has been well catalogued in this link.
And ROS paths of the sort package://blah/blah do not seem to be resolved as well. I know this because the console throws the following error
Couldn't find package 'blah' in the supplied packagepath: PackageMap:
[EMPTY!]
In another stack question, one of the authors of the Drake repo suggested we can transform the .stl files during build time. I tried searching for how you can exactly do this but couldn't find anything. I have the feeling that I am missing something fundamental here. Any help would be appreciated.
Thanks in Advance
Using Russ's comment, what you need to do is the following
parser = Parser(plant)
parser.package_map().PopulateFromFolder("path/to/folder/containing/package.xml")
parser.AddModelFromFile("your.urdf")
There are many ways to populate the package map, as linked in Russ's comment
Related
I am trying to remove opencv fully from my system. I was trying to learn ROS, while in tutorials I faced an issue. After creating empty workspace I invoke
catkin_make
It gives an common error, I searched and asked around in answers.ros
here is the link of the question
I think I found out the problem was opencv libraries which I had build before installing ROS-Noetic, creating the error, I searched around how to remove opencv, but non of the answers totally remove opencv without removing my opencv names files.
Is there a common solution on how to remove opencv?
Ubuntu 20.04
ROS Noetic
Best way if you installed opencv from source and still have the build directory, simply go there and call make uninstall. Another solution is to delete all opencv related files as you already know and suggested in many other similar questions like this. You could also try to use synaptic package manager if you installed using a package.
I suggest for the future to install development libraries a custom folder, so it will be just a matter of deleting that folder if something goes wrong. In this way you can also have different opencv versions in your system, this is how I do.
I'm trying to setup Openpose + Pyopenpose following in a container following this gist: https://github.com/christian-lanius/PyOpenPose.
That works fine until the caffe compilation step, during which a opencv2/core.hpp not found exception is thrown (note that the OpenCV installation step terminates successfully). While there are a number of rather similar questions around, I nonetheless couldn't find a viable solution in my context.
I'm assuming I have to somehow link OpenCV so it can be found by other applications - do you guys have any idea how to fix or circumvent this error?
Thanks!
I am trying to create a barcode scanner from a usb camera for Raspberry Pi. I used the tutorial on this site to install OpenCV on the Pi:(https://gist.github.com/rodrigobaron/072a85460e46c48e3bee24fe140b9fdb).
After I used the make command (the third to last step of the tutorial), the following error occurred:
error: 'GL_PERSPECTIVE_CORRECTION_HINT' was not declared in this scope
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is important to note that I used the simple "make" command rather than "make -j4" as the "j4" option allows it to work on all four cores of the raspberry pi, and it is suggested to eliminate "-j4" if an error occurs.
Upon searching for what caused this issue, I have discovered that it may be due to OPEN_GL support not needing to be enabled, or it might also be caused by an error in the header files. I have not determined how to re-write the make file to eliminate OPEN_GL support, nor do I feel comfortable altering the header files without good cause. I would appreciate any advice on fixing the issue as I feel I have exhausted my options. Thank you.
Disabling OPENGL cmake parameters (-DWITH_OPENGL=OFF) should fix the problem. i.e.
cmake -DWITH_QT=ON -DWITH_OPENGL=OFF -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON
Another option is to go to line 3229 and just comment that line out. It will build then.
This may not be the best method, but it worked for me..my file looks like this.
opencv/modules/highgui/src/window_Qt.cpp
void OpenGlViewPort::initializeGL()
{
//glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
}
For the past couple of weeks I've been working on creating a custom Collada exporter for Revit Architecture, based on the example give here. In order to ensure that my output is correct, I'm comparing it to the output generated by the Revit to Lumion Bridge. I've gone though the files a half-dozen times or more and, aside from the way I name my elements, I cannot find any ways in which my export differs from theirs. For some reason, however, theirs imports just fine and mine doesn't. I'm building this for use with Unity, but I've also tried it with 3ds max and Blender, with the same results in each program.
I was hoping someone could point me in the direction of a Collada debug tool, or that someone may be able to look through the two files and see if they can find something I've missed.
Custom Exporter Output: Custom Exporter.dae
Revit to Lumion Bridge Output: Revit to Lumion Bridge.dae
Thanks in advance for any help, this is really giving me a headache >_>
One thing you can try is schema validation. If you run xmllint on your file, it might discover the problem. This only finds errors that violate the schema though, so it won't catch all problems.
I am new to opencv and I am using opencv for windows. How can I see the source code for a specific function of an opencv library ? I just one want to get an idea of how that specific machine vision algorithm is implemented.
You can get the OpenCV source code from https://github.com/opencv. An easy way to find the header for a function is to open an explorer window in OPENCV_HOME\build\include (where is the location where you chose to install OpenCV) and use the search box to find the header file that contains your function - this will help you know what module it is in. Then you can search in OPENCV_HOME\modules\MODULE_NAME\src to find the source of the the function. This is even easier if you install a search tool like grepWin.
Looking at the source is almost essential for finding out why those pesky OpenCV exceptions are thrown. It also means that you can answer most things about OpenCV yourself without having to ask here.
Here is a direct link to an excellent source code search, courtesy of Github. This is a very straightforward way to find the implementation and internal usages of a function or type.
All the source is now on github:
https://github.com/opencv/opencv and you can use it's search functionalities as well.
I found the answer by Drew Noakes to be the most helpful, especially given the fact that repository structures keep changing over time.
To search in the code or in other places inside a repository using a keyword, the instructions here can be followed.
What would be even easier for first-timers however, would be to simply search for a key word in the github search bar. Then the appropriate advanced search option would generate the tags described in the the earlier linked tutorial.