Closed ghost closed 3 years ago
Put your mesh files in a http server, such as apache,
in your URDF file load them from their URL (mesh =filename="package://mesh_URL"/>
<mesh filename="package://nao_description/meshes/mesh1.dae"/>
(just an example)
then load your robot description into the memory from a launch a file:
`
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name ="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="use_gui" value="true"/>
</node>
in the html file be sure to setup the path parameter:
// Setup the URDF client.
var urdfClient = new ROS3D.UrdfClient({
ros : ros,
tfClient : tfClient,
path : 'http://URL_to_directory_containing_your_meshes_in_apache',
frameID : 'base_link',
rootObject : viewer.scene,
loader : ROS3D.COLLADA_LOADER_2
});`
and after launching rosbridge_websocket.launch and running tf2_web_republisher you should visualize your model in a web page.
let me know if it works or if it there is any problem
:+1: Thanks. I am using nodejshttp-server
, and it works well too. Now I can see the nao visualization. Thanks.
hi ghost, can you send me the mesh of Nao model and working project, I want to use that into my project too.
Hello. Somebody to help me? I need to create a nodejs http-server that will contain the mesh files of my robots. I'm new in javascript and roslibjs, so I've having a hard time for one week now.
How to visualize my turtlebot3 waffle on web, Thanks for the help
If I have the mesh files of Nao in my computer, how to visualize it like PR2 in the tutorial? Thanks.