RobotWebTools / ros3djs

3D Visualization Library for use with the ROS JavaScript Libraries
https://robotwebtools.github.io/ros3djs
Other
360 stars 215 forks source link

How to visualize Nao robot? #146

Closed ghost closed 3 years ago

ghost commented 8 years ago

If I have the mesh files of Nao in my computer, how to visualize it like PR2 in the tutorial? Thanks.

MerAARIZOU commented 8 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

ghost commented 8 years ago

:+1: Thanks. I am using nodejshttp-server, and it works well too. Now I can see the nao visualization. Thanks.

tomeroto commented 6 years ago

hi ghost, can you send me the mesh of Nao model and working project, I want to use that into my project too.

wilfried97 commented 4 years ago

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.

PVGanesh2000 commented 9 months ago

How to visualize my turtlebot3 waffle on web, Thanks for the help