-
Notifications
You must be signed in to change notification settings - Fork 216
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
ROS3Djs in combination with ROS2 #658
Comments
It depends on the support by roslib(https://github.com/RobotWebTools/roslibjs). The currently released version of roslib does support all the ROS2 interfaces except actions. |
We were testing if we could visualise a PointCloud2 message in the browser using ros3Djs.
Do you have any suggestions on how to fix this problem? |
That is not compatible with ROS2 (yet) |
Ok, that's too bad. |
That repo, |
Ok. |
I can't say. You need to ask @EzraBrooks and @sea-bass . |
We are working on porting the tf2_web_republisher. But this is a set of open source repos, so anyone is always welcome to contribute! |
I found the following repository (https://github.com/Wisc-HCI/tf2_web_republisher_py) containing a port of the |
I can only speak to this fork from @pac48 which I've seen work: https://github.com/pac48/tf2_web_republisher ... but I am unsure if it's in a fully ready state at the moment. You're welcome to try! |
Ok, nice. I will take a look at it after the Easter holidays! |
Hi everyone! After some busy days, I've found the time to test the To visualise a 3D pointcloud in the browser, I've used the following Javascript: <script type="text/javascript" type="text/javascript">
const ros = new ROSLIB.Ros({
url: 'ws://192.168.69.20:9090'
})
// Create the main viewer.
const viewer = new ROS3D.Viewer({
divID : 'viewer',
width : 800,
height : 600,
antialias : true
});
// Setup a client to listen to TFs.
const tfClient = new ROSLIB.TFClient({
ros : ros,
angularThres : 0.01,
transThres : 0.01,
rate : 10.0
});
var cloudClient = new ROS3D.PointCloud2({
ros: ros,
tfClient: tfClient,
rootObject: viewer.scene,
topic: '/rs_bpearl/pointcloud',
material: { size: 0.1, color: 0xff00ff }
});
</script> I have the following terminal output:
and unfortunately no pointcloud is visualised. |
@davidDS96 You will also need this fork on roslibjs https://github.com/pac48/roslibjs/tree/pr-add-TF2Client in order to use the tf2_web_republisher. I added a class called TF2Client that you need to use. Also, make sure you have the rosidl-generator-py package installed. |
@pac48 I would appreciate it if you could let me know how to use the rosidl-generator-py package after installing it. |
@pac48 I tried to integrate your fork of roslibjs into my project but I am running into a few problems with regards to Javascript: several imports are not working or are not found import assign from "object-assign" is throwing an error for not finding the package. Unfortunately, this is only one of the error messages I have. |
@davidDS96 You will need to use the fork in your package.json, something like this @DeveloperKSH That package is used by colcon build to generate the Python messages for custom message packages. You should not need to do anything special after it is installed. |
@pac48 I would appreciate it if you tell me how to build the roslibjs? I want to use it with ros3djs, will it work? |
@Nick-PAN You should be able to clone the roslibjs repo and run |
@pac48 Hi Paul! Since I'm not so familiar with Javascript development, is it maybe possible to give a step-by-step guide of how to implement your fork of the roslibjs and the roslib3Djs framework starting from a simple html file such as here: https://github.com/RobotWebTools/roslibjs/blob/develop/examples/simple.html? |
Hello @pac48 , could you share your roslibjs prebuild version ? |
Thank you @pac48 ! I solved my problem by your reply, and displayed the Universal Robot model on web successfully.
|
How do we install and run ROS3Djs with ROS2 Humble to visualize a URDF and interact with the joint state publisher in the browser because there are no pre-built libraries existing? @pac48 @Nick-PAN any example repos for reference please? Following the above, I have the following: git clone -b pr-add-TF2Client https://github.com/pac48/roslibjs.git npm install cd /path/to/roslibjs/examples ros2 launch rosbridge_server rosbridge_websocket_launch.xml python3 -m http.server The simple URDF HTML file displays connected. However, I do not see the robot model on the webpage. In particular, I'm launching the ros2 launch tiago_gazebo tiago_gazebo.launch.py is_public_sim:=True moveit:=True world_name:=pick from the repo link: https://github.com/pal-robotics/tiago_simulation How can I display the robot model on the webpage? For the TF2 I have used the following, ros2 run tf2_web_republisher tf2_web_republisher Please help to resolve this issue. Thank you |
Hello all,
I was wondering if the ROS3Djs framework is also supported for usage with ROS2.
Anyone some news on that?
Best regards
The text was updated successfully, but these errors were encountered: