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

ROSlib not receiving all Logs from /rosout_agg #559

Closed
owuraku-zenas opened this issue Aug 21, 2022 · 1 comment
Closed

ROSlib not receiving all Logs from /rosout_agg #559

owuraku-zenas opened this issue Aug 21, 2022 · 1 comment
Labels

Comments

@owuraku-zenas
Copy link

Description
I'm using ROSlibjs to subscribe to /rosout_agg and I'm not receiving all the logs. Only level 2 and error logs come through but rostopic echo /rosout_agg echos all the logs. Is this issue from end?

  • Library Version: roslib: ^1.1.0
  • ROS Version: Noetic
  • Platform / OS: Ubuntu 20.04 LTS

Steps To Reproduce

var rosout_agg = new ROSLIB.Topic({
                ros: ros,
                name: "/rosout_agg",
                messageType: "rosgraph_msgs/Log"
})
rosout_agg.subscribe((message) => {
            let today = new Date();
            let date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
            let time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
            let dateTime = date + ' ' + time;
            console.log(dateTime)
            console.log("message", message);
            setLogs([...logs, { date: dateTime, data: message }])
            localStorage.setItem('logs', JSON.stringify(logs))
})

Expected Behavior

Actual Behavior

@MatthijsBurgh
Copy link
Contributor

With level 2, you mean info level?

You are just using a generic topic. So ROSLIB is not doing any magic there. Try to subscribe to a custom topic on which you just publish manually.

If that fails to work, try the syntax used in the test example,

example.subscribe(function(message) {
if (message.data === topic1msg.data) return;
topic1msg = messages1[0];
expect(message).to.be.eql(messages2.shift());
if (messages1.length) example.publish(topic1msg);
else done();
});

k-aguete pushed a commit to k-aguete/roslibjs that referenced this issue Oct 21, 2022
@MatthijsBurgh MatthijsBurgh closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants