Hi Constantinos,
thanks for using the stack. The question you asked is a really tricky one. I will try to help you with the process but I'll need you to be patient and bare with me.
First, if you look into
rosjs_resources/resources/pr2_description
you will see how PR2 is modeled.
1. Create a directory "my_robot_description" under rosjs_resources/resources
2. rosmake wviz (this will create a copy of your resources at a location where wviz can find them)
3. To test things out, create a copy of index.html in wviz/www with the name wviz_my_robot.html
4. In wviz_my_robot.html find the following part (lines 99-101)
// 6. Set the control panel's visualization manager
visualization_control_widget.setVM(vm);
}
Make that piece of code look like the following
// 6. Set the control panel's visualization manager
visualization_control_widget.setVM(vm);
var myRobot = vm.addRobotModel("resources/my_robot_description/my_urdf.xml");
}
5. Up to this point you have a robot model installed and you edited the wviz main page so that it loads your robot model when it comes up.
6. Now cross your fingers (and that is really important) and in your web browser load
localhost:8000/wviz/wviz_my_robot.html
If you see anything being loaded, fantastic. If nothing appears, then there might be a couple of problems:
- Check if the resources folder you created are copied into wviz/www/resources/my_robot_description
- Try to open the Console of your browser (you can use Firebug for Firefox or Ctrl+Shift+J for Chrome) and send us the dump of the messages you're getting
Let us/me know, and good luck :)
Ben
27 Eylül 2012 Perşembe 11:23:51 UTC-4 tarihinde clantos yazdı: