Giter Club home page Giter Club logo

gzweb's Introduction

gzweb's People

Contributors

aitormf avatar chapulina avatar daewok avatar dependabot[bot] avatar felipegdm avatar gerkey avatar german-e-mas avatar iche033 avatar jfarseneau avatar jliviero avatar kunaltyagi avatar mayman99 avatar moriarty avatar nkoenig avatar okanasik avatar phuicy avatar rob-clarke avatar ruffsl avatar sandroweber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gzweb's Issues

Manipulators not attached to spawned model

Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


In translate mode with a model already selected, if you spawn a new model, the translation manipulators appear on top of the new model but not attached to it (so moving the manipulators doesn't move the model).

A few times the new model is spawned but the manipulators remain on the model where they were before, working fine.

Deploy.sh errors on VM'ed Ubuntu 12.04

Original report (archived issue) by Nick Sweet (Bitbucket: nckswt).

The original report had attachments: gzweb-build-report-nckswt.txt


(Not sure if I should be adding this here or on http://answers.gazebosim.org/)

When I run the deploy.sh script, I get a number of errors. Here's a selection of them (full output attached):

#!bash

home/cohrint/gzweb/tools/gzcoarse.cc: In function ‘void ExportTextureSource(const gazebo::common::SubMesh*, const gazebo::common::SubMesh*, TiXmlElement*, const char*)’:
/home/cohrint/gzweb/tools/gzcoarse.cc:144:25: error: invalid conversion from ‘long unsigned int*’ to ‘unsigned int*’ [-fpermissive]
/home/cohrint/gzweb/tools/nanoflann.hpp:947:21: error:   initializing argument 3 of ‘void nanoflann::KDTreeSingleIndexAdaptor<Distance, DatasetAdaptor, DIM, IndexType>::knnSearch(const ElementType*, size_t, IndexType*, nanoflann::KDTreeSingleIndexAdaptor<Distance, DatasetAdaptor, DIM, IndexType>::DistanceType*, int) const [with Distance = nanoflann::L2_Simple_Adaptor<double, PointCloud<double> >, DatasetAdaptor = PointCloud<double>, int DIM = 3, IndexType = unsigned int, nanoflann::KDTreeSingleIndexAdaptor<Distance, DatasetAdaptor, DIM, IndexType>::ElementType = double, size_t = unsigned int, nanoflann::KDTreeSingleIndexAdaptor<Distance, DatasetAdaptor, DIM, IndexType>::DistanceType = double]’ [-fpermissive]
make[2]: *** [tools/CMakeFiles/gzcoarse.dir/gzcoarse.cc.o] Error 1
make[1]: *** [tools/CMakeFiles/gzcoarse.dir/all] Error 2
make: *** [all] Error 2
#!bash

make: Entering directory `/home/cohrint/gzweb/gzbridge/build'
  CXX(target) Debug/obj.target/gzbridge/GZNode.o
g++: fatal error: no input files
compilation terminated.
/bin/sh: 1: /usr/include: Permission denied
make: *** [Debug/obj.target/gzbridge/GZNode.o] Error 126
make: Leaving directory `/home/cohrint/gzweb/gzbridge/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/cohrint/gzweb/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:70:17)
gyp ERR! stack     at maybeExit (child_process.js:360:16)
gyp ERR! stack     at Process.onexit (child_process.js:396:5)
gyp ERR! System Linux 3.2.0-60-generic-pae
gyp ERR! command "node" "/home/cohrint/gzweb/node_modules/.bin/node-gyp" "build" "-d"
gyp ERR! cwd /home/cohrint/gzweb/gzbridge
gyp ERR! node -v v0.6.12
gyp ERR! node-gyp -v v0.9.6
gyp ERR! not ok 

#!bash

error [Errno 2] No such file or directory
Traceback (most recent call last):
  File "./webify_models_v2.py", line 44, in <module>
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 506, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I'm running this on a VM of Ubuntu 12.04 from OS X on a late 2013 rMBP. Any idea what the issues might be caused by? This was built from the default branch, but I've also tried the 1.1.0 branch to the same outcome.

Error when inserting first simple shape

Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


When the first simple shape (box/cylinder/sphere) is inserted, there's the following error on the server side:

#!bash

Error [Param.cc:146] Empty string used when setting a required parameter. Key[name]
Error [parser.cc:469] Unable to read attribute[name]
Error [parser.cc:688] Error reading element <model>
Error [parser.cc:348] Unable to read element <sdf>
Error [parser_urdf.cc:2608] Unable to call parseURDF on robot model
Error [parser.cc:299] parse as old deprecated model file failed.
Error [World.cc:1469] Unable to read sdf string[<sdf version ='1.4'><model name=''><pose>0 0 0 0 -0 0</pose><link name ='link'><inertial><mass>1.0</mass></inertial><collision name ='collision'><geometry></geometry></collision><visual name ='visual'><geometry></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script></material></visual></link></model></sdf>]

The error doesn't show for the shapes inserted afterwards.

Light intensity inconsistency

Original report (archived issue) by Luc Guyot (Bitbucket: luc_guyot_).


Because THREE.js light intensity is some factor divided by the attenuation constant of the light from the sdf file, the client light intensity decreases as the server light intensity increases, and vice et versa.
Taken from gziface.js:

  obj = this.scene.createLight(light.type, light.diffuse,
        light.attenuation_constant * factor,
        light.pose, range, light.cast_shadows, light.name,
        direction, light.specular, light.attenuation_linear,
        light.attenuation_quadratic);

Quick fix: THREE.js light intensity = some factor / attenuation constant

GZ3D.Gui.prototype.round modifies its stats argument

Original report (archived issue) by Anonymous.


As you can see from this gzgui.js's excerpt, the round function modifies stats properties:

GZ3D.Gui.prototype.round = function(stats, isColor, decimals)
{
  if (typeof stats === 'number')
  {
    stats = this.roundNumber(stats, isColor, decimals);
  }
  else // array of numbers
  {
    stats = this.roundArray(stats, isColor, decimals);
  }
  return stats;
};

Fix proposal:

GZ3D.Gui.prototype.roundArray = function(stats, isColor, decimals)
{ 
  var result = {}; 
  for (var key in stats)
  {
    if (stats.hasOwnProperty(key)) {
      if (typeof stats[key] === 'number')
      {
        result[key] = this.roundNumber(stats[key], isColor, decimals);
      }
    }
  }

  return result;
};

optimize initial loading of resources in browser

Original report (archived issue) by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


Now that we have many models and hence thumbnails, these images get downloaded as soon as users access gzweb, requiring them to download a up to MBs of data. It would be nice to reduce the amount of traffic sent to the client on load.

options:

  • reduce thumbnail size

  • load thumbnails on demand (e.g. when navigating the insert panel, or when a model gets added to the world tree)

Creating local model of turtlebot_description package

Original report (archived issue) by Yuki Furuta (Bitbucket: furushchev).


Hi, all!

I'm trying to run the tutorial of turtulebot_simulator ( http://wiki.ros.org/turtlebot_simulator ) using gzweb.

I could run the launch roslaunch turtlebot_gazebo turtlebot_empty_world.launch, and I could see a turtlebot on gazebo sim.

Then I executed ./start_gzweb.sh, and could see the ground of gazebo world, but no turtlebot has been found.

I know that in order to use custom model on gzweb, local model has to be deployed.
So, I executed some commands as follow:

export GAZEBO_MODEL_PATH=`rospack find turtlebot_description`/..:$GAZEBO_MODEL_PATH
cd /path/to/gzweb
./deploy.sh -m local

After this, I checked that turtlebot_description directory has been copied to http/client/assets folder.

How should I do next?

Filepath doesn't exist during webify of cinder_block.dae

Original report (archived issue) by noonien_soong (Bitbucket: noonien_soong).


$ cd /gzweb && ./deploy.sh -m
pulling from #!/osrf/gzweb
searching for changes
no changes found
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- gzweb version 1.1.0
-- Build type not selected: Release selected by default
-- checking for module 'gazebo>=1.3.0'
--   found gazebo, version 2.1.0
-- checking for module 'jansson'
--   found jansson, version 2.2.1
-- Boost version: 1.46.1
-- Boost version: 1.46.1
-- Found the following Boost libraries:
--   system
--   filesystem
--   regex
--   thread
-- Found PROTOBUF: /usr/lib/libprotobuf.so
-- Configuring done
-- Generating done
-- Build files have been written to: /gzweb/build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/gzweb/gzbridge/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/.node-gyp/0.6.12/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/.node-gyp/0.6.12',
gyp info spawn args   '-Dmodule_root_dir=/gzweb/gzbridge',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Debug', '-C', 'build' ]
make: Entering directory `/gzweb/gzbridge/build'
  CXX(target) Debug/obj.target/gzbridge/GZNode.o
  CXX(target) Debug/obj.target/gzbridge/GazeboInterface.o
  CXX(target) Debug/obj.target/gzbridge/pb2json.o
  CXX(target) Debug/obj.target/gzbridge/ConfigLoader.o
  CXX(target) Debug/obj.target/gzbridge/OgreMaterialParser.o
  SOLINK_MODULE(target) Debug/obj.target/gzbridge.node
  SOLINK_MODULE(target) Debug/obj.target/gzbridge.node: Finished
  COPY Debug/gzbridge.node
make: Leaving directory `/gzweb/gzbridge/build'
gyp info ok
Downloading gazebo_models...destination directory: gazebo_models
requesting all changes
adding changesets
adding manifests
adding file changes
added 416 changesets with 2028 changes to 1226 files (+19 heads)
updating to branch default
731 files updated, 0 files merged, 0 files removed, 0 files unresolved
Download complete
Installing gazebo_models...-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Install path: /gzweb/http/client/models
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/tmp.r6zmMTDYsY/gazebo_models/build
Install complete
gather all models on the local machine
copying local models to /gzweb/http/client/assets
No local models.
copying local resources to /gzweb/http/client/assets
No local resources
Traceback (most recent call last):
  File "./webify_models.py", line 37, in <module>
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 506, in check_call
    retcode = call(*popenargs, **kwargs)
['sed', '-i', '-e', 's/\\.tga/\\.png/g', '-e', 's/\\.tiff/\\.png/g', '-e', 's/\\.tif/\\.png/g', '-e', 's/\\.jpg/\\.png/g', '-e', 's/\\.jpeg/\\.png/g', '-e', 's/\\.gif/\\.png/g', '/gzweb/http/client/assets/cinder_block_2/meshes/cinder_block.dae']
error [Errno 2] No such file or directory
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Bug: flawed comparisons in gzgui.js (setLight event)

Original report (archived issue) by Luc Guyot (Bitbucket: luc_guyot_).


In the following excerpt:

guiEvents.on('setLight', function (prop, name, value)
      {
        if (value === undefined)
        {
          return;
        }

        var entity = that.scene.getByName(name);
        if (prop === 'diffuse')
        {
          entity.children[0].color = new THREE.Color(value);
        }
        else if (prop === 'specular')
        {
          entity.serverProperties.specular = new THREE.Color(value);
        }
        else if (prop === 'range')
        {
          entity.children[0].distance = value;
        }
        else if (prop === 'attenuation_constant')
        {
          // Adjust according to factor
          var factor = 1;
          if (entity instanceof THREE.PointLight)
          {
            factor = 1.5;
          }
          else if (entity instanceof THREE.SpotLight)
          {
            factor = 5;
          }
          value *= factor;

          entity.children[0].intensity = value;
        }
        else if (prop === 'attenuation_linear')
        {
          entity.serverProperties.attenuation_linear = value;
        }
        else if (prop === 'attenuation_quadratic')
        {
          entity.serverProperties.attenuation_quadratic = value;
        }

        // updating color too often, maybe only update when popup is closed
        that.scene.emitter.emit('entityChanged', entity);
      }
  );

you can observe that entity is compared twice against an instance of aTHREE.js light whereas it is an array containing two THREE.js objects.

Possible fix: use the following variable everywhere possible.

var lightObj = entity.children[0];

Rendering Errors with Gazebo 2.2

Original report (archived issue) by Nick Sweet (Bitbucket: nckswt).

The original report had attachments: Screenshot from 2014-12-09 13:51:40.png, Screenshot from 2014-12-09 13:56:20.png


I rolled my Gazebo install back to the version that pairs best with ROS Indigo, and I have rendering issues now (see attached screenshots).

I ran source /usr/share/gazebo-2.2/setup.sh immediately before running ./deploy.sh -m, but whenever I run the deploy script, I get an error saying:

Error [Node.cc:90] No namespace found

I've traced that error back to this command in gzthumbnails.sh:

gzserver -s /usr/lib/x86_64-linux-gnu/gazebo-2.2/plugins/libModelPropShop.so

But I'm not sure where to go from here. Is that just for thumbnail generation, or would that explain the lack of textures as well?

Inserting custom models

Original report (archived issue) by Nick Sweet (Bitbucket: nckswt).


I'm a bit confused about how to include my own .sdf models into gzweb. I was able to generate a model and thumbnail by placing it in the right spot for deploy.sh to catch it; but when I start gzweb and I go to my client, I can't find the model to insert!

It looks to me like the model categories are hardcoded. Is that true? Is there an easy way to add my models in without editing gzgui.js?

Incorrect zooming on models

Original report (archived issue) by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


Now that we have a yellow indicator to show the point where mouse scrolls zoom to, it reveals that in some cases the zoom point can be incorrect

To reproduce:

  1. insert a box

  2. left click to select the box

  3. mouse scroll to zoom in on the box

the yellow sphere doesn't correspond to the mouse cursor but to the corner of the box

Spawning multiple instances of a mesh causes WebGL error

Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Pull request #36 solved the issue of multiple meshes for many models, such as bowl, beer and bookshelf.

However, trying to spawn more than one instance of models such as coke_can, construction_cone or dumpster now gives the following WebGL error:

Error: WebGL: drawElements: bound vertex attribute buffers do not have sufficient size for given indices from the bound element array

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.