Skip to content

Commit

Permalink
Fold in some unrelated comment changes
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Jun 7, 2022
1 parent ccff420 commit bf4a9b1
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion plugins/gazebo_server/GazeboServer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace gz
/// name="gz::sim::systems::v0::Physics">
/// </plugin>
///
/// <!-- Specify any other ignition gazebo plugins here. -->
/// <!-- Specify any other Gazebo sim plugins here. -->
/// </plugin>
class GazeboServer : public gz::launch::Plugin
{
Expand Down
4 changes: 2 additions & 2 deletions plugins/websocket_server/WebsocketServer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ namespace gz
/// 7. "unsub": Unsubscribe from the topic in the `topic_name` component
///
/// The `topic_name` component is mandatory for the "sub", "pub", and
/// "unsub" operations. If present, it must be the name of an Ignition
/// "unsub" operations. If present, it must be the name of an Gazebo
/// Transport topic.
///
/// The `message_type` component is mandatory for the "pub" operation. If
Expand Down Expand Up @@ -239,7 +239,7 @@ namespace gz
/// \brief All of the websocket connections.
public: std::map<int, std::unique_ptr<Connection>> connections;

/// \brief All of the subscribed Ignition topics.
/// \brief All of the subscribed Gazebo topics.
/// The key is the topic name, and the value is the set of websocket
/// connections that have subscribed to the topic.
public: std::map<std::string, std::set<int>> topicConnections;
Expand Down
12 changes: 6 additions & 6 deletions plugins/websocket_server/ign.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function buildMsg(_frameParts) {
return _frameParts.join(',');
}

/// \brief The main interface to the Ignition websocket server and
/// \brief The main interface to the Gazebo websocket server and
/// data on Gazebo Transport.
function Ignition(options) {
options = options || {};
Expand All @@ -35,7 +35,7 @@ function Ignition(options) {
this.worlds = [];
this.isConnected = false;

// Start with a null root protobuf object. This object will be
// Start with a null root protobuf object. This object will be
// created when we get the set of protobuf definitions from the server.
this.root = null;

Expand Down Expand Up @@ -69,9 +69,9 @@ Ignition.prototype.connect = function(url, key) {
that.emit('error', event);
}

/// \brief Parses message responses from ignition and sends to the
/// \brief Parses message responses from Gazebo and sends to the
/// appropriate topic.
// \param message - the JSON message from the Ignition
// \param message - the JSON message from the Gazebo
// httpserver.
function onMessage(_message) {
if (that.root === undefined || that.root === null) {
Expand All @@ -93,7 +93,7 @@ Ignition.prototype.connect = function(url, key) {
that.socket.send(buildMsg(['topics','','','']));

// Request the list of worlds on start.
// \todo Switch this to a service call when this issue is
// \todo Switch this to a service call when this issue is
// resolved:
// https://github.com/gazebosim/gz-transport/issues/135
that.socket.send(buildMsg(['worlds','','','']));
Expand Down Expand Up @@ -168,7 +168,7 @@ Ignition.prototype.sendMsg = function(_msg) {
/// \brief Interface to Gazebo Transport topics.
function Topic(options) {
options = options || {};
this.ign = options.ign;
this.ign = options.ign;
this.name = options.name;
this.messageType = options.messageType;
this.isAdvertised = false;
Expand Down
72 changes: 36 additions & 36 deletions plugins/websocket_server/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script src='gz3d.js'></script>

<script>
// Create the Connection to the Ignition websocket server
// Create the Connection to the Gazebo websocket server
// This configuration uses SSL and authentication. You can disable both
// by replacing `wss://` with `ws://` and remove the `key` parameter.
// Make sure to also disable SSL and authentication in the
Expand All @@ -26,7 +26,7 @@
});

ign.on('worlds', function(_worlds) {
// \todo Switch this to a service call when this issue is
// \todo Switch this to a service call when this issue is
// resolved:
// https://github.com/gazebosim/gz-transport/issues/135
ign.once('scene', function(_sceneInfo) {
Expand Down Expand Up @@ -76,7 +76,7 @@
var scene = new GZ3D.Scene(shaders);
var sdfParser = new GZ3D.SdfParser(scene);
const ogre2json = new GZ3D.Ogre2Json();

entityMaterial = {};
protocol = "http:";
url = 'localhost';
Expand Down Expand Up @@ -164,7 +164,7 @@
gravity: link.gravity,
kinematic: link.kinematic
};

if (link.inertial)
{
var inertialPose, inertialMass, inertia = {};
Expand All @@ -185,7 +185,7 @@
linkObj.userData.inertial.pose = inertialPose;
}
}

if (link.pose) {
scene.setPose(linkObj, link.pose.position,
link.pose.orientation);
Expand All @@ -199,7 +199,7 @@
linkObj.add(visualObj);
}
}

for (var l = 0; l < link.collision.length; ++l) {
var collision = link.collision[l];
for (var m = 0; m < link.collision[l].visual.length; ++m) {
Expand All @@ -215,7 +215,7 @@
if (model.joint) {
modelObj.joint = model.joint;
}

return modelObj;
}

Expand All @@ -231,12 +231,12 @@
scene.setPose(visualObj, visual.pose.position,
visual.pose.orientation);
}

visualObj.castShadow = visual.cast_shadows;
visualObj.receiveShadow = visual.receive_shadows;

createGeom(geom, visual.material, visualObj);

return visualObj;
}
}
Expand All @@ -246,7 +246,7 @@
if (!material) {
return null;
}

var uriPath = protocol + '//' + url + '/assets';
var texture;
var normalMap;
Expand All @@ -257,7 +257,7 @@
var opacity;
var scale;
var mat;

// get texture from material script
var script = material.script;
if (script) {
Expand All @@ -269,7 +269,7 @@
specular = mat['specular'];
opacity = mat['opacity'];
scale = mat['scale'];

var textureName = mat['texture'];
if (textureName) {
for (var i = 0; i < script.uri.length; ++i) {
Expand All @@ -280,10 +280,10 @@
{
scriptUri = 'file://media/materials/scripts/gazebo.material';
}

var type = scriptUri.substring(0,
scriptUri.indexOf('://'));

if (type === 'model')
{
if (scriptUri.indexOf('textures') > 0)
Expand Down Expand Up @@ -313,7 +313,7 @@
}
}
}

// normal map
if (material.normal_map) {
var mapUri;
Expand All @@ -340,7 +340,7 @@
mapUri + '/' + normalMapName + '.png';
}
}

return {
texture: texture,
normalMap: normalMap,
Expand All @@ -358,7 +358,7 @@
var uriPath = 'assets';
var that = this;
var mat = parseMaterial(material);

if (geom.box)
{
obj = scene.createBox(geom.box.size.x, geom.box.size.y,
Expand Down Expand Up @@ -386,7 +386,7 @@
{
rootModel = rootModel.parent;
}

// find model from database, download the mesh if it exists
// var manifestXML;
// var manifestURI = GAZEBO_MODEL_DATABASE_URI + '/manifest.xml';
Expand All @@ -402,7 +402,7 @@
// }
// };
// request.send();

// var uriPath;
// var modelAvailable = false;
// var modelsElem = manifestXML.getElementsByTagName('models')[0];
Expand All @@ -416,13 +416,13 @@
// modelAvailable = true;
// }
// }

// if (modelAvailable)
{
var meshUri = geom.mesh.filename;
var submesh = geom.mesh.submesh;
var centerSubmesh = geom.mesh.center_submesh;

var uriType = meshUri.substring(0, meshUri.indexOf('://'));
var modelName = '';
// file:// or model://
Expand Down Expand Up @@ -450,13 +450,13 @@
parent.scale.y = geom.mesh.scale.y;
parent.scale.z = geom.mesh.scale.z;
}

var modelUri = uriPath + '/' + modelName;
// Use coarse version on touch devices
if (modelUri.indexOf('.dae') !== -1 && isTouchDevice)
{
modelUri = modelUri.substring(0,modelUri.indexOf('.dae'));

var checkModel = new XMLHttpRequest();
checkModel.open('HEAD', modelUri+'_coarse.dae', false);
checkModel.send();
Expand All @@ -469,13 +469,13 @@
modelUri = modelUri+'_coarse.dae';
}
}

var ext = modelUri.substr(-4).toLowerCase();
var materialName = parent.name + '::' + modelUri;
entityMaterial[materialName] = mat;

modelUri = protocol + '//' + url + '/' + modelUri;

scene.loadMeshFromUri(modelUri, submesh, centerSubmesh,
function(mesh) {
if (mat)
Expand Down Expand Up @@ -518,17 +518,17 @@
var request = new ROSLIB.ServiceRequest({
name : that.scene.name
});

// redirect the texture paths to the assets dir
var textures = geom.heightmap.texture;
for ( var k = 0; k < textures.length; ++k)
{
textures[k].diffuse = parseUri(textures[k].diffuse);
textures[k].normal = parseUri(textures[k].normal);
}

var sizes = geom.heightmap.size;

// send service request and load heightmap on response
heightmapDataService.callService(request,
function(result)
Expand All @@ -542,10 +542,10 @@
geom.heightmap.blend, parent);
//console.log('Result for service call on ' + result);
});

//scene.loadHeightmap(parent)
}

if (obj)
{
if (mat)
Expand All @@ -558,7 +558,7 @@
parent.add(obj);
loadGeom(parent);
}

function loadGeom(visualObj)
{
var allChildren = [];
Expand All @@ -569,7 +569,7 @@
{
allChildren[c].castShadow = true;
allChildren[c].receiveShadow = true;

if (visualObj.castShadows)
{
allChildren[c].castShadow = visualObj.castShadows;
Expand All @@ -578,12 +578,12 @@
{
allChildren[c].receiveShadow = visualObj.receiveShadows;
}

if (visualObj.name.indexOf('COLLISION_VISUAL') >= 0)
{
allChildren[c].castShadow = false;
allChildren[c].receiveShadow = false;

allChildren[c].visible = scene.showCollisions;
}
break;
Expand Down
2 changes: 1 addition & 1 deletion src/Manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class Executable
public: std::list<std::string> envs;
};

/// \brief Private data variables for the Ignition class.
/// \brief Private data variables for the Gazebo class.
class gz::launch::ManagerPrivate
{
/// \brief Constructor.
Expand Down

0 comments on commit bf4a9b1

Please sign in to comment.