joint_state_publisher_js not showing sliders
Hi, I have been testing the package from robotwebtools called join_state_publisher_js. The main purpose of this package is to control a 3d urdf model through the explorer. I'm using ubuntu 14.04 and ROS indigo.
http://wiki.ros.org/joint_state_publi...
Well, the problem is that the sliders, which should appear at the right of the 3d model, are not being represented, it's an empty space in my case. The 3D representantion runs properly. I have followed the brief tutorial, so I'm getting the model r2d2.xacro from the urdf_tutorial package to test it. I don't know if something is going wrong in this package or what is the problem, I have only got the code from the tutorial.
Thank you very much! Regards
EDIT: Note that packages joint_state_publisher_js and joint_state_publisher are not the same. Anyway I tried to set the use_gui param true, but It didn't work.
EDIT2: I attach the html code I'm using, it's the same the tutorial gives.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="http://cdn.robotwebtools.org/threejs/current/three.min.js"></script>
<script src="http://cdn.robotwebtools.org/threejs/current/ColladaLoader.min.js"></script>
<script src="http://cdn.robotwebtools.org/ColladaAnimationCompress/current/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 src="http://cdn.robotwebtools.org/joint_state_publisher_js/current/jointstatepublisher.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://localhost: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
});
// 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
});
var jsp = new JOINTSTATEPUBLISHER.JointStatePublisher({
ros : ros,
divID : 'sliders'
});
}
</script>
</head>
<body onload="init()">
<div id="sliders" style="float: right"></div>
<div id="urdf"></div>
</body>
</html>
I'm using the r2d2 urdf movable model given my the urdf_tutorial package, you can find it there: https://github.com/ros/urdf_tutorial/...
If I run the model by rviz and execute the normal joint_state_publisher I get it working and the joint menu appears when I set it to true. So I think the trouble is not in the model execution, because I can also view it properly on the web browser.
The command I use to set it up is the following:
roslaunch joint_state_publisher_js run_with_xacro.launch model:=/opt/ros/jade/share/urdf_tutorial/urdf/06-flexible.urdf
EDIT 3:
Thanks for your answer! I've checked it and I get the following messages:
mutating the [[Prototype]] of an object ...
Are there any errors in the 'javascript console'? Not sure what it is called in other browsers (I mainly use Firefox).
I posted the same error on the RWT google groups and the CND link was updated. Try this http://cdn.robotwebtools.org/jointsta... It works for me now.