Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

616
Vistas
is there a way to display URDF from ROS with javascript

i tried to display URDF with java script like that enter image description here

according to that tutorial link http://wiki.ros.org/ros3djs/Tutorials/VisualizingAURDF and this is the code

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <script src="../public/js/three.js"></script>
    <script src="../public/js/ColladaLoader.js"></script>
    <script src="../public/js/ColladaLoader2.js"></script>
    <script src="../public/js/STLLoader.js"></script>
    <script src="../public/js/eventemitter2.min.js"></script>
    <script src="../public/js/roslib.min.js"></script>
    <script src="../public/js/ros3d.min.js"></script>
  <script>
    /**
     * Setup all visualization elements when the page is loaded.
     */
    function init() {
      // Connect to ROS.
      var ros = new ROSLIB.Ros({
        url: 'ws://192.168.0.104:9090'
      });
      // Create the main viewer.
      var viewer = new ROS3D.Viewer({
        divID: 'urdf',
        width: 800,
        height: 600,
        antialias: true
      });
      // Add a grid.
      viewer.addObject(new ROS3D.Grid());
      // Setup a client to listen to TFs.
      var tfClient = new ROSLIB.TFClient({
        ros: ros,
        angularThres: 0.01,
        transThres: 0.01,
        rate: 10.0
      })
      //  viewer.add(tfClient);
      console.log('this is tfclient' + tfClient);
      // Setup the URDF client.
      var urdfClient = new ROS3D.UrdfClient({
        ros: ros,
        tfClient: tfClient,
        //    path : 'http://resources.robotwebtools.org/',
        rootObject: viewer.scene,
        loader : ROS3D.COLLADA_LOADER_2
      });
      console.log('this is urdf' + urdfClient);
    }
  </script>
</head>

<body onload="init()">
  <h1>Simple URDF Example</h1>
  <div id="urdf"></div>
</body>

</html>

but the grid is displayed without the 3d model of the robot .. what should i do this is the result of running the code enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda