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

roslibjs logging functions missing? #352

Open
joshua-glazer opened this issue Feb 7, 2020 · 8 comments
Open

roslibjs logging functions missing? #352

joshua-glazer opened this issue Feb 7, 2020 · 8 comments

Comments

@joshua-glazer
Copy link

My team was looking into how to use ROS logging (loginfo, logerr, logwarn) in roslibjs for our project but it doesn't look like this functionality exists right now. If it does exist, how can I use it? Otherwise, I think it would be good to have.

@Rayman
Copy link
Contributor

Rayman commented Feb 10, 2020

On the browser side, I always use console.log because that is very well integrated in the chrome debugger (viewing/filtering)

If you want, you could create a publisher to the rosout topic.

@joshua-glazer
Copy link
Author

I suppose that works, but to correctly publish to /rosout I would need to generate the seq, header and other data in the message.

@joshua-glazer
Copy link
Author

I've made significant progress in writing functions to behave like the rospy log functions. Some things are still missing but I'm hoping to make a PR with my code at some point.

@MatthijsBurgh
Copy link
Contributor

@vashmata still planning to open a PR with logging functions?

@joshua-glazer
Copy link
Author

joshua-glazer commented Jun 13, 2021

@vashmata still planning to open a PR with logging functions?

Thanks for the reminder @MatthijsBurgh, last year I actually did finish the basic functionalities on our end. I'd like to make a PR, but where do I put the code? It's a script that has to be loaded after the ROSLIB.ros() object is created and ROS connection has been established. Not sure where in your file/folder structure it belongs. I created a little example webpage with buttons that demos the functionality too.

@joshua-glazer
Copy link
Author

You can take a look at Logging.html and ros_log.js over here to get an idea:
https://github.com/vashmata/roslibjs/tree/ros_logging/examples

@joshua-glazer
Copy link
Author

joshua-glazer commented Jan 13, 2022

Made a PR to get some eyes on it, but the CI test for noetic failed, not sure why. Here's the error that I think is causing the failure:

Firefox 95.0 (Ubuntu 0.0.0) TF2 Republisher Example tf republisher FAILED
	Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

I don't know what this has to do with my changes, firstly because it's referencing an example (tf2 republisher) I didn't touch, and secondly because I'm not super familiar with async and whatnot and I don't think I even used that in my files.

@MatthijsBurgh
Copy link
Contributor

@vashmata I trigger a re-run of the CI. Let's see what happens.

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

Successfully merging a pull request may close this issue.

3 participants