Skip to content

Cannot Implement Turtlesim Actionlib example #160

@Kasidit0052

Description

@Kasidit0052

Hello, I've encountered some problem regarding the turtle_actionlib shape_client examples. Even though the script detect roscore, the actionlib server receives nothing

This is the output log
[INFO] [1599833315.613] (ros): Connected to master at http://localhost:11311!

and this is my client-side code

#!/usr/bin/env node
'use strict';
let rosnodejs = require('rosnodejs');
rosnodejs.initNode('/my_node', {onTheFly: true}).then((rosNode) => {
  const shapeActionGoal = rosnodejs.require('turtle_actionlib').msg.ShapeActionGoal;
  const ac = rosnodejs.nh.actionClientInterface(
    "/turtle_shape",
    "turtle_actionlib/Shape"
  );
  ac.sendGoal(new shapeActionGoal({
    goal: {
        edges: 3,
        radius: 1
      }
    }));
  setTimeout(function() {
    console.log("timeout")
    ac.cancel();
  }, 1000);

});

If the problems can be solved, could you please elaborate the solution?
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions