ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

RobotWebTools.org: using ros3djs with own URDF

asked 2013-05-27 22:22:47 -0600

Chrimo gravatar image

Hi community, I've tried to use RobotWebTools ros3djs with own created robot.urdf. Is there a description, how to use it ? What must be running at the server side ? What must be changed at html file ?

I get the following erros, when trying to test my robot model: process[robot_state_publisher-2]: started with pid [4108] [robot_state_publisher-2] process has died [pid 4108, exit code 255, cmd /opt/ros/groovy/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/ros/.ros/log/52bc6f94-c76e-11e2-a00d-00139508481b/robot_state_publisher-2.log]. log file: /home/ros/.ros/log/52bc6f94-c76e-11e2-a00d-00139508481b/robot_state_publisher-2*.log

I'm using the following launch file: <launch> <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"> </node>

</launch>

Any suggestions ? Thanks in advance

Cheers Chrimo

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-05-28 00:15:47 -0600

Chrimo gravatar image

updated 2013-05-28 00:18:17 -0600

I've changed some parameters and all nodes startup without error messages now:

started roslaunch server http://ros:51535/

SUMMARY

PARAMETERS * /robot_description * /robot_state_publisher/publish_frequency * /rosbridge/port * /rosbridge_websocket/authenticate * /rosdistro * /rosversion * /use_gui

NODES / robot_state_publisher (robot_state_publisher/robot_state_publisher) rosapi (rosapi/rosapi) rosbridge_websocket (rosbridge_server/rosbridge_websocket) tf2_web_republisher (tf2_web_republisher/tf2_web_republisher)

auto-starting new master process[master]: started with pid [5714] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 48110e0a-c77e-11e2-be9c-00139508481b process[rosout-1]: started with pid [5727] started core service [/rosout] process[rosbridge_websocket-2]: started with pid [5739] process[rosapi-3]: started with pid [5742] process[robot_state_publisher-4]: started with pid [5749] [INFO] [WallTime: 1369735597.567725] Rosbridge WebSocket server started on port 9090 process[tf2_web_republisher-5]: started with pid [5781]

But when connecting to webserver, the robot will not be shown:

I use the following html code: <html> <head> <title>MockBot URDF</title> <meta charset="utf-8"/>

<script src="http://cdn.robotwebtools.org/threejs/current/three.min.js"></script> <script src="http://cdn.robotwebtools.org/ColladaAnimationCompress/0.0.1/ColladaLoader2.min.js"></script> <script src="http://cdn.robotwebtools.org/EventEmitter2/current/eventemitter2.min.js"></script> <script src="http://cdn.robotwebtools.org/roslibjs/current/roslib.min.js"></script> <script src="http://cdn.robotwebtools.org/ros3djs/current/ros3d.min.js"></script> <script> (function(i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'UA-39765480-1', 'robotwebtools.org'); ga('send', 'pageview'); </script> <script> function init() { var ip = location.host; var ros = new ROSLIB.Ros({ url : 'ws://'+ip+':9090' }); var viewer = new ROS3D.Viewer({ divID : 'urdf', width : window.innerWidth, height : window.innerHeight, background : '#efefef', antialias : true }); viewer.addObject(new ROS3D.Grid()); new ROS3D.UrdfClient({ ros : ros, tfClient : new ROSLIB.TFClient({ ros : ros, angularThres : 0.01, transThres : 0.01, rate : 10.0 }), path : 'http://resources.robotwebtools.org/', rootObject : viewer.scene }); } </script>

</head> <body onload="init()">

</body> </html>

Now my new questions: 1. what is the path at ROS3D.UrdfClient ? ... path : 'http://resources.robotwebtools.org/' ...

  1. what is this ???
<script> (function(i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'UA-39765480-1', 'robotwebtools.org'); ga('send', 'pageview'); </script>

<script>

Thanks for some more hints :-)

Cheers Chrimo

BTW: you will find my last work at: https://github.com/mockbot/MockBot.git

edit flag offensive delete link more
1

answered 2013-06-24 03:51:13 -0600

rtoris288 gravatar image

Currently, ros3djs only supports loading Collada meshes from the URDF. The path variable you see is the base URL where the mesh files are located. ros3djs will then attempt to load those files and display them (e.g., http://www.ros.org/wiki/ros3djs#Mesh_Resource_Hosting). Other URDF model types could be added, but are currently unsupported. A feature request could be made here: https://github.com/RobotWebTools/ros3djs/issues/

The GoogleAnalyticsObject code snippet you posted is for Google analytics tracking on the Robot Web Tools website. It has nothing to do with the demo. Instead of using the source code from that page, I would check out these:

http://www.ros.org/wiki/ros3djs/Tutorials/VisualizingAURDF https://github.com/RobotWebTools/ros3djs/blob/stable/examples/urdf.html http://robotwebtools.org/jsdoc/ros3djs/current/ROS3D.UrdfClient.html

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-05-27 22:22:47 -0600

Seen: 1,544 times

Last updated: Jun 24 '13