Comments (7)
Hi @addy1997 - can you provide an example of what you've tried that hasn't worked? The URDF doesn't looks so unique so it should be able to be loaded based on the example code.
from urdf-loaders.
Hi @gkjohnson,
I tried something like this to load the 3D model (in .GLB format ) of Panda robotic arm using AFRAME. The issue with .GLB model is that it doesn't store the properties of the Panda robot similar to the URDF file. My objective is to replicate Panda robot's motion on the 3D model on WebXR.
from urdf-loaders.
Sorry I meant using the URDFLoader. There are instructions and examples, including for WebXR, in the README - what have you tried that isn't working?
from urdf-loaders.
Hi @gkjohnson,
So I am trying to import urdf-loaders into my index.html file but it throws this error:
Error
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta charset="utf-8" />
<title>Telemetry transfer from Panda robotic arm to the Digital twin</title>
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/dist/aframe-extras.misc.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/3.1.7/signalr.min.js"></script>
<!--<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"urdf-loaders": "https://raw.githubusercontent.com/gkjohnson/urdf-loaders/master/javascript/src/URDFLoader.js"
}
}
</script>-->
<script type="module">
import { URDFLoader } from '../urdf-loaders/javascript/src/URDFLoader.js';
AFRAME.registerComponent('load-panda-urdf', {
init: function () {
const manager = new THREE.LoadingManager();
const loader = new URDFLoader(manager);
loader.load(
'../urdf-loaders/urdf/T12/urdf/T12.URDF',
robot => {
// The robot is loaded!
this.el.sceneEl.object3D.add(robot);
});
}
});
</script>
</head>
<html>
from urdf-loaders.
Error
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
This is an issue with your server or build process setup and not related to this project. There's not enough information to see what's happening and unfortunately I don't have the availability to help with this unrelated issue. I recommend looking up the error thats been logged and becoming familiar with the node and npm package ecosystem. You can also ask for help at stackoverflow.com or the threejs forums - even though this isn't related to three people may be able to guide you.
from urdf-loaders.
Hi @gkjohnson,
Thanks for the clarification and apologies for opening this issue. This appears to be an error in my server.
When I try to load this file (using the code below), I got these errors
import 'urdf-loader';
const manager = new THREE.LoadingManager();
const loader = new URDFLoader(manager);
loader.load('https://cdn.jsdelivr.net/gh/StanfordASL/PandaRobot.jl@master/deps/Panda/panda.urdf',
robot => {
// The robot is loaded!
this.el.sceneEl.object3D.add(robot);
})
from urdf-loaders.
Please see the documentation on how to implement support for other geometry file types, such as OBJ.
from urdf-loaders.
Related Issues (20)
- Is it possible to use this repo as a base to code SDF loaders in javascript? HOT 3
- URDF file loading KO HOT 12
- Joint selection KO HOT 1
- Forward Kinematics HOT 1
- PR: use latest three.js version HOT 1
- TS return type for setJointValue HOT 4
- How to display urdf model ? HOT 1
- Zoom issue with urdf model HOT 2
- Change background color HOT 1
- Display of fixed joints in controls HOT 1
- Question of integrating ROS data with URDF… HOT 1
- dragging in simple example HOT 2
- Issue with Prismatic mimic joints
- THREE.ColladaLoader: Unsupported primitive type: polygons HOT 1
- Add obj, glb and gltf mesh types to URDFLoader HOT 1
- Is it possible to change Robot Mesh Color programmatically ?? HOT 1
- The robot arm renders an error in the browser HOT 3
- Enable to load urdf files from vs code HOT 5
- Hexapod kinematics failed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urdf-loaders.