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

Using roslibjs and one simple action server Errors [closed]

asked 2015-02-13 06:23:19 -0600

pexison gravatar image

updated 2015-02-16 06:35:34 -0600

Hello, using roslibjs to connect with rosbridge, with the objective of sending a goal to a simple action server, I am getting this error:

[INFO] [WallTime: 1423829560.345222] Client connected.  1 clients total.
[ERROR] [WallTime: 1423829560.496586] [Client 0] [id: advertise:/control/goal:1] advertise: Unable to load the manifest for package gamma. Caused by: gamma
[INFO] [WallTime: 1423829560.770795] [Client 0] Subscribed to /control/status
[ERROR] [WallTime: 1423829560.780198] [Client 0] [id: subscribe:/control/feedback:4] subscribe: Unable to load the manifest for package gamma. Caused by: gamma
[ERROR] [WallTime: 1423829560.790271] [Client 0] [id: subscribe:/control/result:5] subscribe: Unable to load the manifest for package gamma. Caused by: gamma

I think that the package.xml file is missing but i don't know what is the specific content of this file for this case (to specify the goal, result and feedback).

So where can I place the package and what does it contain?

Maybe its related to one file error, i guided my self by the tutorial and the webpage says error at the back end, maybe I am doing something wrong, i paste my file here:

<!DOCTYPE html>
<html>
<head>
  <title> First button </title>
  <meta charset="utf-8"/>
  <script type="text/javascript" src="http://cdn.robotwebtools.org/EventEmitter2/current/eventemitter2.min.js"></script>
  <script type="text/javascript" src="http://cdn.robotwebtools.org/roslibjs/current/roslib.min.js"></script>

  <script type="text/javascript" type="text/javascript">

  //connect to ROS
  var ros = new ROSLIB.Ros({ url: 'ws://localhost:9090' });

  //emit the error on the backend if exist
  ros.on('error', function(error) {
      document.getElementById('connecting').style.display = 'none';
      document.getElementById('connected').style.display = 'none';
      document.getElementById('closed').style.display = 'none';
      document.getElementById('error').style.display = 'inline';
    console.log(error);
  });

  //Connection made
  ros.on('connection', function() {
    console.log('Connection made');
      document.getElementById('connecting').style.display = 'none';
      document.getElementById('connected').style.display = 'none';
      document.getElementById('closed').style.display = 'none';
      document.getElementById('error').style.display = 'inline';
  });

  //Connection closed
  ros.on('close', function() {
    console.log('Connection closed');
      document.getElementById('connecting').style.display = 'none';
      document.getElementById('connected').style.display = 'none';
      document.getElementById('closed').style.display = 'none';
  });

  ///////////////////////////////////////////////////////////////////
  //Action Client
  ///////////////////////////////////////////////////////////////////

  // Conect to the server on charge of the mobile control of the turtlebot
  var controlServer = new ROSLIB.ActionClient({
    ros : ros,
    serverName: '/control',
    actionName: 'gamma/ControlAction'
  });  

  //Created function to move foward the turtlebot
  function forward() {
    //Create the variable that will be associated to the goal
    var twist = new ROSLIB.Message ({
      linear : {
        x : 0.1, 
        y : 0.0, 
        z : 0.0 
      },
      angular : { 
        x : 0.0, 
        y : 0.0, 
        z : 0.0
      } 
    }); 

    //Create the goal
    var goal = new ROSLIB.Goal({
      actionClient : controlServer,
      goalMessage : twist 
    });

    //Send the goal to the server to execute the callbacks
    goal.send();
    console.log("Goal sent forward");
    return true;
  }
  </script>

</head>

<body>

  <div id="statusIndicator">
    <p id="connecting">
      Connecting to rosbridge...
    </p>
    <p id="connected" style="color:#00D600; display:none">
      Connected
    </p>
    <p id="error" style="color:#FF0000; display:none">
      Error in the backend!
    </p>
    <p id="closed" style="display:none">
      Connection closed.
    </p>
  </div ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by pexison
close date 2015-02-16 06:35:47.505031

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-02-16 06:34:53 -0600

pexison gravatar image

The problem was with this line of code:

  var controlServer = new ROSLIB.ActionClient({
    ros : ros,
    serverName: '/control',
    actionName: 'gamma/ControlAction'  <-----------
  });

Changed actionName to the right location of the .action file solved the problem.

edit flag offensive delete link more
0

answered 2015-02-13 07:40:39 -0600

rtoris288 gravatar image

In order for rosbridge to see any custom packages you have installed, you must first source your devel/setup.bash in your catkin workspace before launching rosbridge in the same terminal window. That way it will be able to load your package's manifest.

edit flag offensive delete link more

Comments

already source my devel/setup.bash and the problem continue. what else can be?

pexison gravatar image pexison  ( 2015-02-13 12:52:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-02-13 06:23:19 -0600

Seen: 1,513 times

Last updated: Feb 16 '15