Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add geometry in ROS3D viewer #404

Open
Rezenders opened this issue Jun 9, 2021 · 1 comment
Open

Add geometry in ROS3D viewer #404

Rezenders opened this issue Jun 9, 2021 · 1 comment

Comments

@Rezenders
Copy link

Hello,

I am trying to add a few circles in a ROS3D.viewer in predetermined locations but I am getting a weird behaviour. When I add the geometries my robot model breaks (why??). I tried adding ROS3D.Arrow instead just to test if it would work and it works just fine, but if I copy the exact same code of the ROS3D.Arrow and paste it in my javascript the same weird problem occurs.

I tired doing like this:

var geometry = new THREE.CircleGeometry( 0.1, 32 );
geometry.translate(goal[0], goal[1], 0.05 );
var material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
var mesh = new THREE.Mesh( geometry, material );

viewer.scene.add(mesh)

And I also tried modifying the ROS3D.Arrow to create a new class called Circle and adding it like this:

viewer.scene.add(new Circle({
    origin: new THREE.Vector3(goal[0], goal[1], 0.05),
    material: new THREE.MeshBasicMaterial( { color: 0xff0000 } ),
})); 

This is an example of the bug, you can notice that there are a couple of black arrows on top of the robot model, I did not add those arrows, I added only the red ones, it can also be noticed that even one of the red arrows is missing a part.
image

k-aguete pushed a commit to k-aguete/ros3djs that referenced this issue Oct 21, 2022
Bumps [xmldom](https://github.com/xmldom/xmldom) from 0.1.31 to 0.5.0.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](xmldom/xmldom@v0.1.31...0.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@MatthijsBurgh
Copy link
Contributor

Might be related to #598.

#598 (comment) also shows correct way to add objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants