ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

mtbsteve's profile - activity

2020-12-14 09:03:33 -0500 received badge  Notable Question (source)
2020-12-14 09:03:33 -0500 received badge  Popular Question (source)
2020-12-14 09:03:33 -0500 received badge  Famous Question (source)
2020-02-18 11:14:08 -0500 commented answer rosbridge publish to /joy_node: Error Received a message without an op

Thanks @gvdhoorn adding the quotes to the frame_id variable fixed it. But since the frame_id is left empty also in the „

2020-02-18 10:34:18 -0500 marked best answer rosbridge publish to /joy_node: Error Received a message without an op

I am trying to publish joystick movements to the /cmd_vel topic and the /joy_node topic from rosbridge Android. While publishing to the /cmd_vel node works perfectly fine, publishing to /joy_node fails with the Error: "Received a message without an op." over the same connection to the ROSbridge master.

My coding:

....
   private float joy_axes[] = {0f, 0f, 0f, 0f, 0f, 0f};
    private int joy_buttons[] = {0,0,0,0,0,0,0,0,0,0,0,0};
    private int sequence_ID = 0;
    private long time_stamp_sec= System.currentTimeMillis()/1000;
    private long timestamp_nsec=222234283;
    private long time_stamp_prev;
    private String frame_id="";

private void onLoginSuccess() throws JSONException {
        // we advertise the ROS topic node we want to use for the Joystick (cmd_vel supports only the analog axis movements,
        // the joy node is the "real" ROS topic to publish all joystick features)
        Advertise("/cmd_vel", "geometry_msgs/Twist");
        Advertise("/joy_node", "sensor_msgs/Joy");
        connected_to_ros =true;
        connected_to_ros_message = "Connected to ROS Server: " + message;

        // send a test message to /cmd_vel ***** this works
        String cmdvel = "{\"op\":\"publish\",\"topic\":\"/cmd_vel\",\"msg\":{\"linear\":{\"x\":" + joy_axes[0] + ",\"y\":" + joy_axes[1] + ",\"z\":" + joy_axes[2] + "},\"angular\":{\"x\":" + joy_axes[3] + ",\"y\":" + joy_axes[4] + ",\"z\":" + joy_axes[5] + "}}}";
        client.send(cmdvel);

        //build the json array for the axes and buttons
        JSONArray json_joy_axes= new JSONArray();
        for (int i = 0; i < joy_axes.length; i++) {
            json_joy_axes.put(joy_axes[i]);
        }
        JSONArray json_joy_buttons= new JSONArray();
        for (int i = 0; i < joy_buttons.length; i++) {
            json_joy_buttons.put(joy_buttons[i]);
        }

        //send a test message to /joy_node **** this fails
        String joynode = "{\"op\":\"publish\",\"topic\":\"/joy_node\",\"msg\":{\"header\":{\"seq\": " + sequence_ID + ",\"stamp\":{\"secs\": " + time_stamp_sec + ",\"nsecs\": " + timestamp_nsec + "},\"frame_id\": " + frame_id + "},\"axes\":" + json_joy_axes +",\"buttons\":" + json_joy_buttons + "}}";
        client.send(joynode);
    }

I read here in this forum that rosbridge doesnt have a dedicated error handling for the parsing od json obects and that the error received indicates some problem with the json object definition. So I verified the json string in JSONlint and it appears valid and consistent with the message type definition at http://docs.ros.org/api/sensor_msgs/h...

What is wrong with my json object here? Thanks!

2020-02-18 10:34:18 -0500 received badge  Scholar (source)
2020-02-18 03:11:39 -0500 answered a question rosbridge publish to /joy_node: Error Received a message without an op

OK I could finally solve the problem. The issue was the definition of the frame_id. While the ROS message definition dec

2020-02-18 03:11:39 -0500 received badge  Rapid Responder (source)
2020-02-17 11:55:31 -0500 commented question rosbridge publish to /joy_node: Error Received a message without an op

Yes I know. Thats why I am trying to use the /joy topic. I implemented the /cmd_vel topic only to verify that rosbridge

2020-02-17 11:40:20 -0500 commented answer rosbridge publish to /joy_node: Error Received a message without an op

Thanks @gvdhoorn I tried advertising of /joy and publishing to /joy instead of /joy_node makes no difference. I still ge

2020-02-17 09:11:30 -0500 edited question rosbridge publish to /joy_node: Error Received a message without an op

rosbridge publish to /joy_node: Error Received a message without an op I am trying to publish joystick movements to the

2020-02-17 09:04:11 -0500 asked a question rosbridge publish to /joy_node: Error Received a message without an op

rosbridge publish to /joy_node: Error Received a message without an op I am trying to publish joystick movements to the

2020-02-03 16:53:57 -0500 received badge  Enthusiast
2020-01-21 10:15:33 -0500 asked a question ROS for Android install fails with Could not resolve org.codehaus.mojo:animal-sniffer-annotations:1.14

ROS for Android install fails with Could not resolve org.codehaus.mojo:animal-sniffer-annotations:1.14 I am trying to in