-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ros3djs does not load 3D models (both .dae or .stl), does not display any errors. #209
Comments
Thanks for providing such a detailed description! That helps rule out quite a few possible causes already. I don't think it's relevant to your problem, but you only need to import one ColladaLoader (https://static.robotwebtools.org/ros3djs/0.18.0/ColladaLoader.js - that one's patched to maintain compatibility with RViz). One thing that's missing is the ROS side, though. What nodes are you running, and are they configured correctly? Specifically, are you running Also, can you check your server logs to see if |
Thanks for your quick reply @T045T ! I've removed the other ColladaLoader so the one you mentioned is now the only ColladaLoader being loaded. On the ROS side, I'm running:
Similar lines are printed when a specific file is accessed. However, no such lines are printed while both snippets of code I posted earlier are executed, which means that the models are never even accessed... I did another test to confirm that the proxy is working fine: in that same fetch('/pacbot_description/package.xml').then(response => {
console.log(response);
}); The fetch request is able to complete without any problem at all, and I just noticed this as well, it says "Blocked" for each of the .dae files. Why could that be? |
Which type of image format does your collada include? If your image format is something like |
@jihoonl The Collada files were converted from STL files in Meshlab, and the models didn't even have textures to begin with. But I don't see how that has anything to do with why the XHR requests for each of the meshes are being blocked. |
From what I understand, "blocked" here means the time the browser princess was blocked trying to make the request, not the request itself being blocked. That said, I'm sorry, but I'm out of ideas what might be broken here :( |
Right @T045T and @jihoonl, I did some further testing and I think I have been able to find the cause of the problem. I'll describe here what I did to test it and what I can conclude from that. The I created a file <script src="http://localhost/monitor-control/test.js"></script> Firefox's network monitor showed the same status for this script request as it did for the XHR requests for the models and the console complained that the script failed to load. I then thought I'd add the port number: <script src="http://localhost:5000/monitor-control/test.js"></script> Now the script was able to load. It started to seem as though anything in these <script src="/monitor-control/test.js"></script> Once again, the script was able to load. Relative links apparently do respect my proxy. In the var xhr = new XMLHttpRequest();
xhr.open('GET', '/pacbot_description/CMakeLists.txt', true);
xhr.addEventListener('load', event => {
console.log(event.target.response);
});
xhr.addEventListener('error', event => {
console.log("Error: ", event);
});
xhr.send(); Playing around with the URL just as above taught me that the relative link worked without a hitch, as well as the tl;dnr |
Solving this problem, however, threw me into another problem. While my robot's .dae models are in fact getting accessed and read by the ColladaLoader, nothing shows up in the actual viewer. The ColladaLoader does print a number of lines with timing information while loading the models though:
What could be going wrong this time? |
this will hopefully make situations like RobotWebTools#209 easier to debug
Thanks for keeping us posted on your progress - I added in some error reporting in MeshResource that will hopefully make it faster to debug to at least the point you've got to for others with similar problems in the future. Unfortunately, it's hard to remotely diagnose what's still going wrong - the only advice I can think of is using the non-minified versions of all libraries (just remove |
this will hopefully make situations like #209 easier to debug
Hello, Can someone help me please? |
@IgarashiToure That's quite a lot of errors... While practically the same, your browser may think that In the mean time, I have not yet had any time to do more debugging, but I'm happy with the changes made to MeshResource 👍 |
I was able to setup a React project and load a @bvobart feel free to study the example provided in sandbox and if you still have problem, feel free to reach out. |
@bvobart Did you solved the problem? |
@msjulio00 No, I'm sorry. I ran into this problem during a project that ended in the beginning of February. Since then I have not looked at the source code anymore, and I did fresh install of Ubuntu, meaning I no longer have ROS installed. My code should still be in a repository somewhere, but I do not think I'll be able to take the time to revisit the code and confirm whether I still have the same problem. If you have a similar problem, maybe you can try to get @louisgv's example project working. P.S. Should I close this issue? |
I am trying to use this but I run into the same problem in this issue and getting to this point as reported by @bvobart: "Solving this problem, however, threw me into another problem. While my robot's .dae models are in fact getting accessed and read by the ColladaLoader, nothing shows up in the actual viewer. The ColladaLoader does print a number of lines with timing information while loading the models though" I have also tried the example of @louisgv but same result: empty viewer. @louisgv could you give me info of what system are you using to visualize this? indigo/kinetic? Also, are there any steps I need to take before visualizing the html? |
Hello everybody. I had this problem (at least one similar) a few moths ago and recently it came back to me. Fortunatelly in my case was solved. if I am not wrong is the same problem, but just in case I will describe. I am with ubuntu 16.04, ROS Kinetic, and I am working with ur_10 robot and two ensensos. The main problem was that every time i wanted to visualize the robot in my webpage, the collada models were not loaded. and only appeared in the visualizer the basic shapes sended. Checking in the debugger of the browser, I found a similar error like the one seen in my way to solve the problem was simple replacing http://localhost in my browser direction by http://192.168.1.240 I am not quite sure is the same error, but hope it helps somebody! The curious fact is that it worked on this project with several computers and this issue only appeared in one of them. |
Hi all,
If you tried my example project, please zoom in. Thr model is very small,
thus it seems that there was no model, but in fact it is there.
I will try to update my example with a better model soon.
…On Wed, Aug 1, 2018, 01:12 Solrac3589 ***@***.***> wrote:
Hello everybody. I had this problem a few moths ago and recently it came
back to me. Fortunatelly in my case was solved. if I am not wrong is the
same problem, but just in case I will describe.
I am with ubuntu 16.04, ROS Kinetic, and I am working with ur_10 robot and
two ensensos. The main problem was that every time i wanted to visualize
the robot in my webpage, the collada models were not loaded. and only
appeared in the visualizer the basica shapes sended.
Checking in the debugger of the browser, I found a similar error like the
one seen in
#209 (comment)
<#209 (comment)>
[image: screenshot from 2018-08-01 10-07-45]
<https://user-images.githubusercontent.com/20369132/43509426-f219cb72-9572-11e8-8a15-27f8611391af.png>
my way to solve the problem was simple replacing http://localhost in my
brewser direction by http://192.168.1.240
I am not quite sure is the same error, but hope it helps somebody!
The curious fact is that I worked on this project with several computers
and this issue only appeared in one of them.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#209 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGaX9iu1ZZqdbc3iQ0kFGrg-6cBOezG8ks5uMWLxgaJpZM4RfIs5>
.
|
@beatrizleon Hi, this is my specs:
And I'm running ros lunar on my machine. Can you please show me how you run my example project? A screenshot as well as the command you used would be very helpful. I'm so sorry about the lack of dedicated readme. I will be working on replacing the model with a better one next week and I will make sure it is visible on first load. Thanks in advance! |
@Solrac3589 The problem you are seeing is because the browser refuse to load your model from a foreign service. To fix that, you can either ask the server to accept CORS, or simply download the model and use it locally. This is a browser security feature. |
@Solrac3589 I have replaced the model in sandbox with a better one that's 2 meter in height, which should show up immediately without the need to zoom-in like so: I have also updated the readme with hopefully better instruction on how to run the app. (Please check the Please let me know if you need further assistance :) |
* Fix links in example and readme (#206) * Report error from ColladaLoader in MeshResource (#210) this will hopefully make situations like #209 easier to debug * Added Rollup * Added yarn lockfile * Removed references to COLLADA_LOADER_2 * Added es6 transpiler and rollup config, working on transpiling * Touched up a couple potential mistypes prevent transpiler from working. 1 - removed explicit super.super() call from InteractiveMarker. 2 - Made Particles explicitly derive from THREE.Object3D. * Rewrote Particles' method signatures in format consistent with rest of codebase * Refactored updateMatrixWorld to be more statically analyzable * ES6 modules properly compiling, Working on runtime errors * Moved 'that' assignments happen *after* calls super constructors in derived classes * Added missing super constructor call * Removed assignment to read-only property causing a runtime error, added a relevant comment * Moved all super constructor calls to preceed any use of 'this' * Added shims for THREE and THREE extensions to support es6 compatible module extensions * Cleanup and added examples for single page applications and using html imports in browsers * Moved es6 support files to es6-support folder and renamed destination for es6 transpiled output * Moved shims to top level * Removed pre-es6 source code and es6 transpiler * DepthCloud: make depth range adaptable + fix depth point position decoding (#207) * PointCloud2 and LaserScan (#218) * buffergeometry in PointCloud2 * pointcloud2: buffergeometry, subsampling * renamed Particles.js to Points.js, deprecation warning in Points.js * Update kitti.html * Removing redundant roslaunch calls in the help. * NavSatFix support (#221) * fix: pointRatio option in PointCloud2 and LaserScan (#223) * Added build products * Removed extra log * Added angular app example * Added react app example and touched up other SPA examples * Added build output * Removed extra log * Added angular app example * Added react app example and touched up other SPA examples * Updated ROSLIB import semantics * Updated ROSLIB import semantics * Switched ColladaLoader shim from official ColladaLoader to the ros3djs fork * Switched ColladaLoader shim from official ColladaLoader to the ros3djs fork * Updated html-import example to use yarn like the other examples * Updated html-import example to use yarn like the other examples * Updated outdated grunt plugins * Fixed linter errors * Updated grunt build process to build es6 output * Switched from jshint to eslint, migrating rules and fixing lint issues * Updated commonjs target to be es5 * Fixed pkg.module to use es6 module syntax, but es5 language features * Fixed bug in Points class * Switched from const to var for es5 compatibility * Added PointCloud2 example for angular app * Updated node version use by CI server
Hello @InsidiousClu! I am also working on ur10 and for me works properly (so, we should find a solution for you!). Can you tell me your configurations? |
@Solrac3589 , thanks for your quick response. Unfortunately ROS instance is running on a separate private server where I can only connect via websockets. For the robot parts I am using combined repositories for that particular robot. |
@InsidiousClu I have checked your code and seems okay for me (actually there is not much secret). About the directory, in my case, i put after the adress the root directory of the colladas (something like "http://127.0.0.1/colladas" and inside colladas, everything) i cannot give you right now the structure because i just finished my job until monday, but if your want we can talk about, then. Anyway, i do no think that's the issue, if the directories not okay, if I am not wrong, it should give an error (missing collada or something) can you check that? What actually i think is happenning is that you have a collada version or a ros3djs version which gives your this problem. If you did not find the issue on monday, if you want we can try with my files. btw did you tried with different browsers? |
@Solrac3589 the problem is that I am using electron, and it's using chromium under the hood over there, so it's not possible to use different browser, but I have also checked that in Safari (created a separate web build for that), FF is not working, cuz there is being used hash-router for SPA application. All files are being successfully loaded, what was displayed on a screenshot of a comment above. Right now I am out of clues, because Btw, I am feeling so dumb at the moment, I will keep you up to date if I will make it work. Thanks! |
Good morning. I have been thinking on your issue a little, I think maybe somewhat there is an issue between your connection and the server. Are you completely sure that roslib node and tf2_web_republisher are loaded right? Try using my files just in case ( i don't think is that, but just to discard). If it is not any of those elements I am quite sure that it is problem with the connection as is said (the colladas seems to be readen correctly so It seems to me to not be the issue there). Can you check in the network tab in devtools if there is any possible clue? BTW don't feel so dumb! i lost many time on that also (and seems we are not alone). I think maybe will be better if to do several checks you talk me directly to mail (carlosrodoreda@gmail.com) and later we give here the solution we achieve or a new state of the art to allow others to help |
@Solrac3589 Hey, I have tried to install fresh ubuntu, installed ROS with all dependencies by myself and ran every command what is listed in README of this repo: https://github.com/InsidiousClu/ros-example |
@InsidiousClu glad to hear that! Anything more, here we are! Just last tought. Maybe you should configure correctly the hosts in your computer in order to recognise the ros from another computer at /etc/hosts ! |
@ashBabu This issue is closed. And as you mention you have an error in |
Hi. I'm currently doing a university project where I want to visualise the robot system we've designed in its accompanying monitor and control web application, built with ReactJS.
The first problem I ran into, was that importing ros3djs through NPM did not work, but that's another issue (#197). I went around this by simply sourcing the scripts in my
index.html
file as follows, of which I'm not entirely sure it's completely correct.Now when the page that should show the 3D visualisation loads, it executes the following code. Note that
ROSLIB
here comes from an ES6 import of roslib's NPM module.The viewer correctly attaches itself to the div it's supposed to attach to and an empty grid is shown. However, my robot's 3D model does not show and there are no errors or warnings to indicate why... RViz correctly able to show the entire system though. As you can see, as a test I tried to retrieve the
robot_description
parameter, which it is successfully able to print.I've been looking for a solution and here's what I've tried so far:
package://
instead offile://
:All filenames are in the form of
package://pacbot_description/meshes/base_link.dae
.stl
files for my robot model, I tried converting them to.dae
files using Meshlab. While doing so, I tried different kinds of loaders for theloader
option in UrdfClient, none seemed to work, not for.stl
nor for.dae
files.http://localhost/
is proxied tohttp://localhost:5000/
by my ReactJS development server. Before I had set up this proxy, I would get CORS header warnings, which indicates that ros3djs does indeed try to fetch the robot's 3D models. After I set up the proxy, these warnings disappeared. The robot's 3D models are statically served by serve. I've checked thathttp://localhost:5000/pacbot_description/meshes/base_link.dae
is a valid location.warnings
set to true:However, no warnings are printed in between the two
console.log
statements, nor after.What is going on here? Is there something I'm missing? How can I further debug my problem?
The text was updated successfully, but these errors were encountered: