Giter Site home page Giter Site logo

web-matlab-bridge's People

Contributors

brendanandrade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nalt gandalfvn

web-matlab-bridge's Issues

Websocket not connecting

When I attempt to run the first two lines of example.m

master_uri = 'ws://localhost:9090';
ws = ros_websocket(master_uri);

A java applet appears saying the Java Websocket is open and allowing me to manually close the Websocket, but when it tries to connect the following error occurs

Error using ros_websocket (line 87)
Java exception occurred:
java.lang.IllegalStateException: WebSocketClient objects are not reuseable

    at org.java_websocket.client.WebSocketClient.connect(WebSocketClient.java:153)


java.net.ConnectException: Connection refused: connect
    at sun.nio.ch.Net.connect(Native Method)
    at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
    at org.java_websocket.client.WebSocketClient.tryToConnect(WebSocketClient.java:201)
    at org.java_websocket.client.WebSocketClient.interruptableRun(WebSocketClient.java:219)
    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:209)
    at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-59" java.lang.NullPointerException
    at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:446)
    at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:475)
    at org.java_websocket.client.WebSocketClient.interruptableRun(WebSocketClient.java:232)
    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:209)
    at java.lang.Thread.run(Unknown Source)

Subscriber in matlab not returning data values

I am using Ubuntu 64 bit , Matlab 2012(a), JAVA 1.7_0.25, MATLAB_JAVA = JAVA 1.7_0.25, used ant to rebuild the src files, added the java_websocket.jar to static class path,

when running example.m, I get the Exception
java.lang.NullPointerException
at com.mathworks.jmi.bean.MatlabBeanInterface.addCallback(MatlabBeanInterface.java:765)
at com.mathworks.jmi.bean.MatlabCallbackInterface.addCallback(MatlabCallbackInterface.java:130)

It is occuring at the line where publisher is initialzed

Main problem --> subscriber.data is empty ... it is not returning any data

Array messages of length 1

If a PoseArray or similar Array message is send from matlab of length one, the json message lacks the [] brackets to indicating an error.

Ex: '{"op": "publish", "topic": "cmd_vel_array", "msg":{
"twists": {
"linear": {
"x": 0.5,
"y": 0,
"z": 0
},
"angular": {
"x": 0,
"y": 0,
"z": 2,
"w": 0
}
}
}}'

It should be: '{"op": "publish", "topic": "cmd_vel_array", "msg":{
"twists": [{
"linear": {
"x": 0.5,
"y": 0,
"z": 0
},
"angular": {
"x": 0,
"y": 0,
"z": 2,
"w": 0
}
}]
}}'

This arises from the behavior of "savejson" function used in the publish method in the Publisher class.

No class org.java_websocket.bridge.ROSBridgeClient can be located on Java class path

It seems like ros_websocket.m can not load the Java object. Do I have to do anything special to let Matlab know where is the java_websocket located?

Thanks!

The full error output:

??? Undefined function or method 'ROSBridgeClient' for input arguments of type 'java.net.URI'.

Error in ==> ros_websocket>ros_websocket.ros_websocket at 82
        obj.client = ROSBridgeClient(obj.MASTER_URI);

Error in ==> example at 37
ws = ros_websocket(master_uri);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.