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

uzair's profile - activity

2019-01-28 13:21:29 -0500 marked best answer unable to install naoqi

I am following the beginner tutorial --Getting start with ROS for the Nao, including NAOqi and rviz.

I was unable to download the 1.14.3 sdk from the aldebaran website so i did it from some other site. When i am trying to run naoqi and executing this command:

$ ~/naoqi/naoqi-sdk-1.12.3-linux32/naoqi

I get an error saying no such file or directory. WHen I cehck the home folder, the file is there in the folder. How do I proceed? How do I install naoqi?

2018-01-15 09:36:10 -0500 received badge  Famous Question (source)
2017-08-15 15:27:29 -0500 marked best answer read data from serial port and publish over a topic

I am trying to write a code to read data from the serial port and publish it over a topic. I know that I can create an node out of the arduino but that will need some huge changes in the code. So this is what I am doing.

#!/usr/bin/env python
import roslib; roslib.load_manifest('numpy_tutorials') #not sure why I need this
import rospy
from std_msgs.msg import String
import serial

def talker():
    ser = serial.Serial('/dev/ttyACM0', 9600)

    pub = rospy.Publisher('chatter', String)
    rospy.init_node('talker')
    while not rospy.is_shutdown():
       data= ser.read(2) # I have "hi" coming from the arduino as a test run over the serial port
       rospy.loginfo(data)
       pub.publish(String(data))
       rospy.sleep(1.0)


if __name__ == '__main__':
    try:
        talker()
    except rospy.ROSInterruptException:
        pass

WHen I run this code, I get the following error.

Traceback (most recent call last):
  File "./serial.py", line 21, in <module>
    talker()
  File "./serial.py", line 8, in talker
    ser = serial.Serial('/dev/ttyACM0', 9600)
AttributeError: 'module' object has no attribute 'Serial'

I think the module serial is not being imported. But why? I was running this script in a package called numpy_tutorials. However when I removed this line import roslib; roslib.load_manifest('numpy_tutorials') #not sure why I need this

and copy pasted the same code in another package called beginner_tutorials, the code runs fine. Why is it not running in
numpy_tutorials package? I have the rospy dependency in both the package.xml files as well.

2017-04-20 16:51:24 -0500 marked best answer is it possible to use gazebo with python in ros? Because all the tutorials only use cpp.

I am trying to use Gazebo for making a simulation in ros. But the documentation only shows examples using c plus plus. Is it possible to use python for coding my controllers in gazebo while using it with ros?

2016-10-14 22:17:50 -0500 answered a question Is knowing ros needed to work on turtlebot project?

Turtle bot runs on the ROS platform so you will need a basic understanding of how ROS works. You can go through the ROS tutorials to get a flavour of how ROS works. Working with turtle bot after going through the tutorials should not be very difficult. There are sme tutorials which are based on the turtle bot itself. There is also a lot of support from the community. You can post questions here about anything you dont understand or about the errors that you might face during your experiments.

2016-09-19 17:46:30 -0500 commented answer py-faster-rcnn network detection runs on CPU through ROS callback function

Hi Will. I am also trying to implement faster-rcnn inside the ROS framework. I want to run the demo as a ROS node and pass images on ROS topic. I know how to pass images over a ROS topic but was wondering if there are any dependancy issues when I try to integrate faster rcnn within ROS?

2016-09-13 12:38:25 -0500 commented question Deep learning

Hi guys. Have you found any libraries for working with deep nets in ROS?

2016-08-14 01:28:30 -0500 marked best answer subscribing and publishing at the same time in rosjava

I hava a subscriber which accepts a string from the pocketsphinx node. I added external jars to my subscriber and I am processing that string. I now need to send the processed string to another node from this node. So I want to subscribe to a string, process it and then publish it. How do I do this in rosjava? I tried to add the import statements for the Cancellable loop and Publisher from the publisher code and also tried to squeeze in the connectedNode.executeCancellableLoop(new CancellableLoop() { }) part of the publisher code. I dont get any build errors but I also dont see the message being published. This is my modified code for the subscriber with the external jars. Where and how do i add the publisher to this node?

package org.ros.rosjava_tutorial_pubsub;

import org.apache.commons.logging.Log;

import org.ros.message.MessageListener;

import org.ros.namespace.GraphName;

import org.ros.node.AbstractNodeMain;

import org.ros.node.ConnectedNode;

import org.ros.node.NodeMain;

import org.ros.node.topic.Subscriber;

import edu.uic.cs.nlp.ros.da.DaClassifier;

import java.io.IOException;

public class Listener extends AbstractNodeMain {

@Override

public GraphName getDefaultNodeName() {

return GraphName.of("rosjava_tutorial_pubsub/listener");

}

@Override

public void onStart(ConnectedNode connectedNode) {

final Log log = connectedNode.getLog();

try { final edu.uic.cs.nlp.ros.da.DaClassifier daClassifer =DaClassifier.getInstance();

Subscriber<std_msgs.string> subscriber =        
connectedNode.newSubscriber("recognizer/output", std_msgs.String._TYPE);
subscriber.addMessageListener(new MessageListener<std_msgs.string>() {
  @Override
  public void onNewMessage(std_msgs.String message) {
  java.lang.String da = daClassifer.classify(message.getData());

  log.info("Classifier's input : \"" + message.getData() + "\"");
  log.info("Classifier's output: \"" + da + "\"");

    }

});

} catch (IOException e) {

    }

} }</std_msgs.string></std_msgs.string>

2016-08-14 01:23:36 -0500 marked best answer using nao with ros hydro

I have a dialogue classifier that I have implemented in ros and I want to test it on the NAO robot. Is it possible to use the simulation of the NAO provided by rviz? does rviz allow me to subscribe to the nodes of the simulated robot to access data being publihsed by other nodes in my package? I am using ros hydro on ubuntu 12.04.4.

2016-05-09 20:52:51 -0500 marked best answer does rospy support scripting in jython?

I am trying to integrate a dialogue classifier in rospy on the NAO robot. I am planning to use the jython script for the stanford nlp parser but i dont know if rospy will support this script. will it?

2016-05-08 15:07:48 -0500 marked best answer Created a custom msg to support an array of strings but I get thhis warning msg when i use it..

I created a custom msg which is an array or strings. this is my declaration:

    string[] data

However when I use this msg, i get a warning. I dont understand why I get this warning.

   [WARN] [WallTime: 1401683261.952534] Could not process inbound connection: topic types do not match:[std_msgs/String] vs. [beginner_tutorials/StringArray]{'message_definition': 'string data\n\n', 'callerid': '/rostopic_3711_1401673205336', 'tcp_nodelay': '0', 'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', 'topic': '/tag_history', 'type': 'std_msgs/String'}

Can somebody please tell me how I can get rid of this? THanks

My code where i am using ths StringArray datatype:

#!/usr/bin/env python
import rospy
from std_msgs.msg import String
from beginner_tutorials.msg import StringArray


def callback(data):
    global c
    str=StringArray()
    pub = rospy.Publisher('tag_history',StringArray)
    c.append(data.data)
    if len(c)>3:
       c=c[1:4]    
    str.data=c
    print str
   pub.publish(str)


 def listener():

 rospy.init_node('tag_history', anonymous=True)

 rospy.Subscriber("DA_tags", String, callback)
 rospy.spin()


if __name__ == '__main__':

 global c
 c=[]
 listener()

This is the data i see when i enter "rostopic echo DA_tags"

 uahmed9@uahmed9-Lenovo-IdeaPad-U410-Touch:~$ rostopic echo DA_tags
 data: Query-yn
 ---
 data: Unknown
 ---
 data: Unknown
 ---
 data: Acknowledge
 ---
 data: Unknown
 ---
 data: Unknown
 ---

This is the output for rostopic info DA_tags

uahmed9@uahmed9-Lenovo-IdeaPad-U410-Touch:~$ rostopic info DA_tags
Type: std_msgs/String

Publishers: 
 * /rosjava_tutorial_pubsub/listener (http://127.0.0.1:59178/)

Subscribers: 
 * /tag_history_32168_1401828816089 (http://uahmed9-Lenovo-IdeaPad-U410-Touch:51087/)
2016-05-08 15:07:37 -0500 marked best answer trying to publish an array of words in rospy using numpy

I am trying to create a subscriber which accepts a word (meaning a string of characters) and then collects those words into an array and then publish the array of these words.

I am trying to use numpy for this. The length of my array always has to be 3 with the latest word at the end. This way I wil have two previous words with the latest word at the end of the array.

This is the code :

#!/usr/bin/env python
import rospy
from std_msgs.msg import String
from rospy.numpy_msg import numpy_msg
import numpy
#added

def callback(data):
    global c
    pub = rospy.Publisher('tag_history',numpy_msg(String))

    c.append(str(data.data))
    if len(c)>3:
       c=c[1:4]    
    d=numpy.array(c,dtype=numpy.str)
    print c
    pub.publish(d)
    rospy.sleep(0.5)



 def listener():

     rospy.init_node('tag_history', anonymous=True)

     rospy.Subscriber("DA_tags", String, callback)
     rospy.spin()


if __name__ == '__main__':

     global c
     c=[]
     listener()

When I run this code, this is the error i get :

[ERROR] [WallTime: 1401656539.688481] bad callback: <function callback at 0x2456758>
Traceback (most recent call last):
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/topics.py", line 682, in _invoke_callback
cb(msg)
File "./tag_history.py", line 17, in callback
pub.publish(d)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/topics.py", line 802, in publish
raise ROSSerializationException(str(e))
ROSSerializationException: field data must be of type str

What does this error "field data must be of type str" mean? How do I remove it?

2016-03-13 03:03:14 -0500 answered a question Error Installing ROS indigo on ubuntu 15.10

Thank you for all the answers. I managed to fix my problem by replacing Ubuntu 15.10 with Ubuntu 14.10 Trusty. Everything works well now. Thanks.

2015-12-09 04:06:40 -0500 received badge  Famous Question (source)
2015-11-03 06:30:49 -0500 received badge  Famous Question (source)
2015-10-31 07:23:54 -0500 received badge  Notable Question (source)
2015-10-30 13:04:11 -0500 received badge  Popular Question (source)
2015-10-30 11:16:36 -0500 commented answer Error Installing ROS indigo on ubuntu 15.10

http://answers.ros.org/question/22006... The answer on this post says "You can always try building ROS from source if you are stuck on 15.10.". Do you know what this means?

2015-10-30 08:26:27 -0500 received badge  Associate Editor (source)
2015-10-30 08:23:53 -0500 asked a question Error Installing ROS indigo on ubuntu 15.10

Hi,

I am trying to install ROS indigo on Ubuntu 15.10. I am following the tutorials given here:

 http://wiki.ros.org/indigo/Installation/Ubuntu

When I enter the command

 sudo apt-get install ros-indigo-desktop-full

I get the error

"Unabe to locate package ros-indigo-desktop-full"

I thought there was something wrong with sources.list file but when I opened it in gedit, the restricted, universe , and multiverse lines are already uncommented. I managed to follow all the steps from 1.1 to 1.4 up until i had to enter

  sudo apt-get install ros-indigo-desktop-full

Which gives me the error mentioned above. Please advise!

2015-10-29 04:11:58 -0500 received badge  Famous Question (source)
2015-06-23 23:30:37 -0500 received badge  Famous Question (source)
2015-05-18 19:09:47 -0500 received badge  Student (source)
2015-03-31 15:18:39 -0500 received badge  Famous Question (source)
2015-03-30 07:56:25 -0500 received badge  Famous Question (source)
2015-03-30 07:56:25 -0500 received badge  Notable Question (source)
2015-03-30 07:56:25 -0500 received badge  Popular Question (source)
2015-02-01 10:53:51 -0500 marked best answer does pocketsphinx work with ros hydro?

I am trying to find a speech processor to convert from audio to text and was wondering if pocketsphynx package which is available here works with ros hydro because the tutorial asks us to use rosmake which was used for ros fuerte.

2014-12-16 15:14:08 -0500 received badge  Notable Question (source)
2014-10-25 22:55:40 -0500 received badge  Famous Question (source)
2014-09-05 16:07:11 -0500 received badge  Notable Question (source)
2014-09-05 16:07:11 -0500 received badge  Popular Question (source)
2014-08-19 23:05:12 -0500 received badge  Famous Question (source)
2014-08-18 06:28:50 -0500 received badge  Popular Question (source)
2014-08-06 06:41:40 -0500 received badge  Notable Question (source)
2014-08-01 04:57:18 -0500 received badge  Notable Question (source)
2014-08-01 03:41:32 -0500 received badge  Famous Question (source)
2014-07-31 04:53:48 -0500 received badge  Notable Question (source)
2014-07-31 04:53:48 -0500 received badge  Famous Question (source)
2014-07-31 04:53:48 -0500 received badge  Popular Question (source)
2014-07-31 04:42:05 -0500 received badge  Famous Question (source)
2014-07-28 22:27:18 -0500 asked a question opening and closing NAO's hand

I am trying to open and close NAO's gripper. I searched the documentations but I could not find what command or what topic to publish on to access the robots grippers.

I want to make NAO hold a paper plate in his hand.

Can somebody please tell me how I can open and close NAO's hand through ROS?

Thanks

2014-07-28 02:38:37 -0500 received badge  Notable Question (source)
2014-07-08 16:11:33 -0500 received badge  Notable Question (source)