Giter Club home page Giter Club logo

jason_ros's People

Contributors

jomifred avatar rezenders avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jason_ros's Issues

Bug when action is not defined in action_manifest

When trying to perform an action that is not being described in action_manifest a key_error occurs in hw_bridge.py.

File "/jason_ws/src/hw_bridge/src/hw_controller.py", line 87, in perform_action  
 action = self.comm_dict[action_name]

Instead of raising the error in hw_bridge.py the action must be set as not done to jason

when agent uses RosArch it is not possible to send/receive msgs via kqml

When an agent uses RosArch it is not possible to send/receive msgs via kqml, only via the ROS topics jason/send_msg and jason/receive_msg. Should it be like this? Allow the programmer to choose? Or create an additional architecture for when the agent needs to communicate via ROS? Like RosArchComm.

Get response from ROS services

Services responses are not being sent to the agent. This should be implemented.

A possible way to do this would be to publish the response into a topic defined in the action description in action manifest, something like the response field below.

[set_fcu_param]
method = service
name = mavros/param/set
msg_type = mavros_msgs/ParamSet
params_name = param_id, value.integer, value.real
params_type = str, int, float
response = mavros/param/set/response

The response can be treated as a perception:

[set_fcu_param_response]
name = mavros/param/set/response
msg_type = mavros_msgs/ParamSetResponse
args = success, value.integer, value.float
buf = add

Rosparams

Allow the user to set rosparams via a configuration file.

Params manifest?

Bug when action msg doesn't contain Header

When the message type being published in action doesn't contain Header the following error arises:

raise AttributeError("%s is not an attribute of %s"%(k, self.__class__.__name__)) AttributeError: header is not an attribute of String

action_manifest:

[teste]
method = topic
name = /hw/teste
msg_type = String
dependencies = std_msgs.msg
params_name = teste1, teste2
params_type = str, bool

Not possible to have 2 agents in the same MAS with jasonros.RosArch architecture

There are 2 problems with having more than one agent in the same MAS using jasonros.RosArch:

  • All nodes have the same name '/jason/agent/' which is not allowed by ROS
  • All agents in the MAS are subscribing to the same 'jason/percepts', 'jason/action_status', and 'jason/receive_msg'. This means that all agents are receiving and processing all messages, even the ones that are meant to other agents. Which results in errors, such as adding perceptions in the BB of all the agents, or maybe processing a wrong action_status.

The quickest solution I can think of is to:

  • run a different HwBridge for each agent and run each one under a different namespace
  • add namespace before action, status, perception and msg topics
  • name of the jason ros node should use agent name as parameter instead of "/jason/agent"

Actions params

Instead of set_mode("custom_mode=GUIDED") use set_mode(GUIDED)
Use what is defined in actions_manifest params_names field

When performing actions latching should be optional

Add a parameter in action_manifest to indicate if the action should be latched or not

Latched actions are generating issues when used for communication. Maybe when the communication gets a separated topic this problem will be solved.

Reformulate perception

usar API da classe jason…Agent
addBel
delBel
e cia

     getTS().getAg().addBel(bel)
    getTS().getAg().getBB().

        getBB().contains(l)
        getBB().getCandidateBeliefs(new PredicateIndicator("altidude", 1));

        Iterator<Literal> ibb =  getBB().getCandidateBeliefs(new PredicateIndicator("altidude", 1));
        while (ibb.hasNext()) {
             Literal l = ibb.next();
             // if for altidude e diferente do atual
             //    ibb.remove();
             // add event for l
        }

// no futuro: get annots source(percept)

Update README

Create a brief tutorial on how to use this project.
Include examples.

Inconsistent treatments for "similar" percepts

Perception msg 1 is added in the belief base as a Term and perception msg 2 is added as a String. Why is this happening? Is this the expected treatment? I think they should be both added as Term.

Percept msg 1:

header: 
  seq: 679
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
agent_name: ''
perception_name: "diagnostics"
parameters: 
  - '[[[energy, 6.208817140973544e-10]]]'
update: True

Perception manifest 1:

[diagnostics]
name = diagnostics
msg_type = diagnostic_msgs/DiagnosticArray
dependencies = diagnostic_msgs.msg
args = status[](values[](key, value))
buf = update

Percept msg 2:

header: 
  seq: 33
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
agent_name: "metacontrol"
perception_name: "diagnostics"
parameters: 
  - '[[[Received packets:, 8867], [Dropped packets:, 0], [Buffer overruns:, 0], [Parse
    errors:, 0], [Rx sequence number:, 215], [Tx sequence number:, 0], [Rx total bytes:,
    286009], [Tx total bytes:, 17200], [Rx speed:, 7497.000000], [Tx speed:, 532.000000]],
    [[Satellites visible, 10], [Fix type, 6], [EPH (m), 1.21], [EPV (m), 2.00]], [[Heartbeats
    since startup, 45], [Frequency (Hz), 1.000003], [Vehicle type, Submarine], [Autopilot
    type, ArduPilot], [Mode, MANUAL], [System status, Active]], [[Sensor present, 0x1330FD2F],
    [Sensor enabled, 0x13209D2F], [Sensor health, 0x13309D2F], [3D gyro, Ok], [3D accelerometer,
    Ok], [3D magnetometer, Ok], [absolute pressure, Ok], [GPS, Ok], [laser based position,
    Ok], [3D angular rate control, Ok], [attitude stabilization, Ok], [yaw position,
    Ok], [motor outputs / control, Ok], [AHRS subsystem health, Ok], [Logging, Ok],
    [Battery, Ok], [pre-arm check status. Always healthy when armed, Ok], [CPU Load
    (%), 0.0], [Drop rate (%), 0.0], [Errors comm, 0], [Errors count #1, 0], [Errors
    count #2, 0], [Errors count #3, 0], [Errors count #4, 0]], [[Voltage, 12.59], [Current,
    0.0], [Remaining, 90.0]], [[Timesyncs since startup, 455], [Frequency (Hz), 10.000050],
    [Last RTT (ms), 5.155978], [Mean RTT (ms), 5.670888], [Last remote time (s), 958.590668000],
    [Estimated time offset (s), 1639747256.374345064]]]'
update: True

Perception manifest 2:

[diagnostics]
name = diagnostics
msg_type = diagnostic_msgs/DiagnosticArray
dependencies = diagnostic_msgs.msg
args = status[](values[](key, value))
buf = update

Add service_aux and topic_pub into CommInfo class

In perform_action:

Should service_aux and topic_pub be moved into CommInfo and just be called in this method?
This might make perform_action faster, however, possible it can make it use more memory

CommInfo

create 2 subclasses? ActionInfo and PercetionInfo?

Manifests as ros params

The manifest files uses the .ini format, and it was necessary to implement how to deal with this files.

I think it is worth exploring if the manifest files can be changed to .yaml format and used with rosparam, instead of reading it in hwbridge.py. With this, it will make the jason-ros package more similar to what is usually done in ROS, and it will leverage what is already implemented in rosparam.

The robot_localization package makes a good use of this, check this example file

Inform the hw_bridge node that the agent node started

Design a way to inform the hw_bridge node that the agent node started, and when this happens the perception "buffer" should be restarted.

When the agent node starts after the hw_bridge node it is missing the first perceptions, since hw_bridge node does not send a perception if it is equal to the last one.

CommInfo data must be a list of list

Expected

Suppose that a particular msg type is:

MyMsg:
string myname
MyCustomMsg mycustommsg

MyCustomMsg:
string custom

In perception_manifest if we want to read the custom field of MyCustomMsg we would need to write the data field as:
data = custom

However, if we are reading MyMsg and want to get the custom field we want to write:
data = mycustommsg.custom

What is happening

In hw_controller.py at subscriber_callback hasattr doesn't find fields that are concataneted

Solution

In CommInfo class data must be an array of array and then at subscriber_callback hasattr/getattr must be called iteratively

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.