cruise-automation / webviz

web-based visualization libraries
https://webviz.io/
Apache License 2.0
2.01k stars 408 forks source link

Error when conneting to rosbridge after running static-webviz #442

Open Shiming94 opened 4 years ago

Shiming94 commented 4 years ago

After building the dependencies and running npm run serve-static-webviz, then typing http://localhost:8080/ in Chrome, it can directly lead to the application page, rather than run http://localhost:8080/app one more time as before. But if I run rosbridge afterwards, the application page will throw an error out. The details are shown in the following screenshot. Screenshot from 2020-05-27 00-38-14 Does somebody know, what is the reason for the error, and how can I solve it? Thanks in advance.

janpaul123 commented 4 years ago

Hm, interesting, I can't reproduce. Do you get the same error if you use docker run -p 8080:8080 cruise/webviz instead of npm run serve-static-webviz?

I think I've seen this error before though, but I forgot in which context. I'll do a release from our internal repo to see if that helps.

janpaul123 commented 4 years ago

Ok I updated master with our latest code changes (https://github.com/cruise-automation/webviz/pull/443), can you pull and try again and see what happens?

Shiming94 commented 4 years ago

Hi, thanks a lot. I have tried the newest code. But it didn't work The error is same. At first I ran docker run -p 8080:8080 cruise/webviz, it will work. But if I ran npm run serve-static-webviz once, the localhost:8080 is occupied, and docker will also not work.

janpaul123 commented 4 years ago

Yeah you can't run them at the same time. But so you're saying that the Docker version did work? What about https://webviz.io/app, does that work? If you're running the new code, can you try checking out a fresh repo (throw away the old repo), and going through all these steps again: https://github.com/cruise-automation/webviz#building-manually

janpaul123 commented 4 years ago

We think we've identified the issue and will be issuing a patch soon. The issue is in the layout migration code. For now can you run localStorage.clear() in the browser console, to clear out your layout, and tell me if that helped?

Shiming94 commented 4 years ago

Hi Jan, I have pulled the latest webviz from github and it seems that the connection problem is solved. Thanks a lot. And then I meet another problem: in the 3D Panel I want to visualize a message in type PoseStamp, at first the message is visualized as a cylinder, then I choose "Use 3D Model" and the message disappears. Do you know what is the reason of it?

janpaul123 commented 4 years ago

Hm, for me that seems to work:

Screen Shot 2020-06-03 at 10 48 31 AM

However, be aware that that option currently only supports setting a Cruise car, so it's probably not very useful for you. We only really support the cylinder right now, though you can modify the dimensions.

chenguoxi1987 commented 4 years ago

Hi,I still have an error as below when I run "docker run -p 8080:8080 cruise/webviz" and "roslaunch rosbridge_server rosbridge_websocket.launch“:

[ERROR] [1591610444.208615]: [Client 0] [id: call_service:/rosapi/topics_and_raw_types:1] call_service InvalidServiceException: Service /rosapi/topics_and_raw_types does not exist

error

janpaul123 commented 4 years ago

Ah, that usually means that you're running an old version of the rosbridge_server. Can you check which version you're running? We require 0.11.4 or later.

janpaul123 commented 4 years ago

Btw I set up a Slack workspace to make it easier for us to chat; join us using the link here: #461

chenguoxi1987 commented 4 years ago

Ah, that usually means that you're running an old version of the rosbridge_server. Can you check which version you're running? We require 0.11.4 or later.

I updata my rosbrige_server version from 0.11.3 to 0.11.8, but I receive the same error. [Client 1] [id: call_service:/rosapi/topics_and_raw_types:266] call_service InvalidServiceException: Service /rosapi/topics_and_raw_types does not exist

Xia0ben commented 4 years ago

Hello there, Was trying to get webviz up and runnin' on our robot today, but got the same error on the rosbridge end :

[ERROR] [1592929866.354902]: [Client 0] [id: call_service:/rosapi/topics_and_raw_types:58] call_service InvalidServiceException: Service /rosapi/topics_and_raw_types does not exist

And in webviz:

Error in fetching topics and datatypes
Service /rosapi/topics_and_raw_types does not exist

I run on the default kinetic rosbridge_server version, which is according to a "rosversion rosbridge_server" command at version "10.1", @janpaul123 which one would you recommend then (since apparently the 0.11.8 does not change the problem according to @chenguoxi1987 ) ?

Maybe it would be beneficial to indicate the ROS versions webviz is being tested against (melodic I suppose ?).

Wish you a pleasant day. =)

janpaul123 commented 4 years ago

@Xia0ben we chatted more in Slack, and it looks like perhaps something went wrong in the upgrade, because on another computer @chenguoxi1987 did get it to work. So I'd still recommend upgrading to 0.11.8.

I'll add a note to the readme about the version that we test against!

Xia0ben commented 4 years ago

Hi ! Thanks for the fast reply, I'll give it a spin probably next week !

jbcpollak commented 2 years ago

sorry to revive a dead thread but I am seeing this issue today with Melodic:

[ERROR] [1652746592.655572]: [Client 0] [id: call_service:/rosapi/topics_and_raw_types:979] call_service InvalidServiceException: Service /rosapi/topics_and_raw_types does not exist

rosuser@host:~$ rosversion rosbridge_server
0.11.13