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

punching's profile - activity

2015-06-21 03:24:12 -0500 marked best answer permission denied when creating custom msg in rosserial
rosrun rosserial_client make_library.py /usr/share/arduino/libraries encoders

I get the following error. But it did create Encoder.h in /usr/share/arduino/libraries/ros_lib/Encoder so I guess I'm ok?

Exporting to /usr/share/arduino/libraries/ros_lib
['encoders', 'rospack', 'roslib', 'std_msgs', 'rosgraph_msgs', 'rosbuild', 'roslang', 'rospy']
Exporting encoders
  Messages:
    Encoder, 

  Services:

Exporting rospack
  Messages:

  Services:

Exporting roslib
  Messages:

  Services:

Exporting std_msgs
  Messages:
    UInt32, UInt32MultiArray, Header, Int16MultiArray, Bool, Int8, Int32MultiArray, Float32MultiArray, Byte, Char, UInt16, Float64, Int32, MultiArrayLayout, Int64MultiArray, String, UInt8MultiArray, UInt64, UInt8, Int16, Time, Int64, MultiArrayDimension, ColorRGBA, UInt16MultiArray, Empty, Int8MultiArray, UInt64MultiArray, Duration, ByteMultiArray, Float64MultiArray, Float32, 

  Services:

Traceback (most recent call last):
  File "/opt/ros/electric/stacks/rosserial/rosserial_client/src/rosserial_client/make_library.py", line 582, in <module>
    MakeLibrary(package, path)
  File "/opt/ros/electric/stacks/rosserial/rosserial_client/src/rosserial_client/make_library.py", line 548, in MakeLibrary
    header = open(output_path + "/" + msg.name + ".h", "w")
IOError: [Errno 13] Permission denied: '/usr/share/arduino/libraries/ros_lib/std_msgs/UInt32.h'
2014-01-28 17:26:56 -0500 marked best answer multiple clientservice in rosserial?

I need multiple service clients on an arduino running rosserial.

In setup() I have: nh.serviceClient(client1); nh.serviceClient(client2);

Only the first is connecting. If I swap the order then client2 is the only one called. No error messages in either serial_node.py or by the Arduino.

Anyone get multiple service clients to work?

2014-01-28 17:26:54 -0500 marked best answer rosserial Device Lost Sync, restarting

I'm using an Arduino 2560. Does anyone have any suggestions on how I can diagnose this? My total sketch size is 60k bytes. I won't include all the code since there's a lot but here's some relevant parts.

    #include <ros.h>
    #include <std_msgs/Int8.h>
    #include <std_msgs/String.h>
    #include <sensors/Analog.h>
    #include <boxing_start/parameters.h>
    #include <networking/WifiList.h>
    #include <networking/WifiConnect.h>
    ros::NodeHandle  nh;

    using networking::WifiList;
    using networking::WifiConnect;

void setup()
{
  nh.initNode();
  nh.serviceClient(client2);
  delay(100);
  nh.serviceClient(client3);
  nh.advertise(p_analog);

  while(!nh.connected()) nh.spinOnce();
  nh.loginfo("Startup complete");

  current_menu = 1;
}

void loop()
{
  nh.spinOnce();

At this point I have a touch screen menu and each part of the menu sets a global variable that tells me what the current menu page is and then I use a switch statement to branch off into individual loop functions. All works fine.

One of the loop functions runs this:

I've got 2 service clients and 1 publisher. From my understanding that's not too much.

If I use rostopic echo /Analog when that part of the loop function is running sometimes it'll return results but usually it's nothing. I doubt it's the code below because it will timeout before I get to the menu that runs that.

analog_msg.pressure1 = analogRead(pressurePin1);
analog_msg.pressure2 = analogRead(pressurePin2);
analog_msg.pressure3 = analogRead(pressurePin3);
analog_msg.pressure4 = analogRead(pressurePin4);
analog_msg.pressure5 = analogRead(pressurePin5);
analog_msg.accel1 = analogRead(accelPin1);

p_analog.publish(&analog_msg);




rosrun rosserial_python serial_node.py
    [INFO] [WallTime: 1344388173.077256] ROS Serial Python Node 1
    [INFO] [WallTime: 1344388173.086662] Connected on /dev/ttyACM0 at 57600 baud
    [INFO] [WallTime: 1344388175.211573] Note: publish buffer size is 512 bytes
    [INFO] [WallTime: 1344388175.260775] Starting service client, waiting for service 'WifiList'
    [INFO] [WallTime: 1344388175.269687] Setup service client on WifiList [networking/WifiList]
    [INFO] [WallTime: 1344388175.273153] Starting service client, waiting for service 'WifiConnect'
    [INFO] [WallTime: 1344388175.280700] Setup service client on WifiConnect [networking/WifiConnect]
    [INFO] [WallTime: 1344388175.301110] Setup publisher on Analog [sensors/Analog]
    [INFO] [WallTime: 1344388175.304173] Note: subscribe buffer size is 512 bytes
    [INFO] [WallTime: 1344388175.308926] Startup complete
    [ERROR] [WallTime: 1344388188.090867] Lost sync with device, restarting...
2014-01-28 17:26:40 -0500 marked best answer 'type' object is not subscriptable

I have a node that is a service that lists wifi access points and their details. When I first run rosrun there's no errors. Then I make a service request and it says Error processing request: 'type' object is not subscriptable. I'm sure it's a basic Python error but I can't figure out what it is. Thanks!

The relevant code:

    ssid_list.append(ssid)
    strength_list.append(strength)
    secured_list.append(secured)

  return WifiListResponse[String(ssid_list), UInt8(strength_list), Bool(secured_list)]

my .srv file:

int8 request
---
string[] ssid_list
uint8[] strength_list
bool[] secured_list
2014-01-28 17:26:32 -0500 marked best answer ros service client arduino not publishing

There's no documentation on the ServiceClient rosserial_arduino script, hoping someone can give me a little help here. I have a Service server running and if I use rosservice call it works so I know the problem is with my Arduino script. It compiles and uploads to the Arduino correctly but nothing shows in the Service server in ROS.

Here's the tcpip.srv file:

string IPaddress
string NETmask
string Gateway
string DNS1
string DNS2
---
int8 success

Arduino script

#include <ros.h>
#include <std_msgs/Int8.h>
#include <std_msgs/String.h>
//#include <rosserial_arduino/Test.h>
#include <networking/tcpip.h>

ros::NodeHandle  nh;
//using rosserial_arduino::Test;
using networking::tcpip;

//ros::ServiceClient<Test::Request, Test::Response> client("test_srv");
ros::ServiceClient<tcpip::Request, tcpip::Response> client("tcpip_srv");

std_msgs::String str_msg;
std_msgs::Int8 int_msg;
ros::Publisher chatter("chatter", &int_msg);

//char hello[13] = "hello world!";

void setup()
{
  nh.initNode();
  nh.serviceClient(client);
  nh.advertise(chatter);
  while(!nh.connected()) nh.spinOnce();
  nh.loginfo("Startup complete");
}

void loop()
{
  tcpip::Request req;
  tcpip::Response res;
  req.IPaddress = "192.168.0.109";
  req.NETmask = "255.255.255.0";
  req.Gateway = "192.168.0.1";
  req.DNS1 = "209.18.47.61";
  req.DNS2 = "209.18.47.62";
  client.call(req, res);
  int_msg.data = res.success;
  chatter.publish( &int_msg );
  nh.spinOnce();
  delay(100);
}
2014-01-28 17:26:32 -0500 marked best answer openni_launch problems with kinect and asus, electric and fuerte.

I've tried getting openni_launch to work on Ubuntu 12.04 with fuerte and a Kinect, also on 11.10 with electric and Kinect and on 11.10 with an Asus Xtion Pro Live and now on a second computer running 11.10, electric and the Asus camera. I'm convinced that there's got to be something wrong with the package. I've followed the instructions to the letter. Latest attempt with 11.10, electric and Asus Xtion.

Are there known problems? I've spent probably 40 hours trying to get it working and hired an experienced ROS developer who has probably 15-20 hours into trying to get it working. Are there known problems with it? Has the project been abandoned?

rosrun openni_launch openni.launch
[rosrun] Couldn't find executable named openni.launch below /opt/ros/electric/stacks/openni_kinect/openni_launch
[rosrun] Found the following, but they're either not files, 
[rosrun] or not executable:
[rosrun]   /opt/ros/electric/stacks/openni_kinect/openni_launch/launch/openni.launch
chris@chris-VirtualBox:/opt/ros/electric/stacks/openni_kinect$ 

rosmake openni_kinect --rosdep-install
[ rosmake ] Packages requested are: ['openni_kinect']                           
[ rosmake ] Logging to directory/home/chris/.ros/rosmake/rosmake_output-20120713-101739
[ rosmake ] Expanded args ['openni_kinect'] to:
['openni_tracker', 'openni_camera', 'depth_image_proc', 'openni_launch', 'openni', 'nite']
[ rosmake ] Generating Install Script using rosdep then executing. This may take a minute, you will be prompted for permissions. . .
Failed to find rosdep nite-dev for package nite on OS:ubuntu version:oneiric
Failed to find rosdep openni-dev for package openni on OS:ubuntu version:oneiric
Failed to find rosdep ps-engine for package nite on OS:ubuntu version:oneiric
[ rosmake ] rosdep install failed: Rosdep install failed                        
chris@chris-VirtualBox:/opt/ros/electric/stacks/openni_kinect$
2014-01-28 17:26:12 -0500 marked best answer kinect install instructions for electric not working

http://www.ros.org/wiki/openni_kinect

I've tried the apt-get install and the source based for electric on Ubuntu 11.10.

When I run the following command it errors out.

punchingpro@punchingpro:~/ros_workspace/drivers$ rosmake openni_kinect --rosdep-install
[ rosmake ] Packages requested are: ['openni_kinect']                           
[ rosmake ] Logging to directory/home/punchingpro/.ros/rosmake/rosmake_output-20120615-132043
[ rosmake ] Expanded args ['openni_kinect'] to:
['nite', 'openni', 'openni_launch', 'openni_tracker', 'openni_camera', 'depth_image_proc']
[ rosmake ] Generating Install Script using rosdep then executing. This may take a minute, you will be prompted for permissions. . .
Failed to find rosdep nite-dev for package nite on OS:ubuntu version:oneiric
Failed to find rosdep openni-dev for package openni on OS:ubuntu version:oneiric
Failed to find rosdep ps-engine for package nite on OS:ubuntu version:oneiric
[ rosmake ] rosdep install failed: Rosdep install failed                        
punchingpro@punchingpro:~/ros_workspace/drivers$
2014-01-28 17:26:08 -0500 marked best answer trouble subscribing to custom messages

First ROS script, jumping into the deep end. I have an Arduino publishing data (it's working fine) to a topic called Adc. I'm trying to write a Subscriber to read that data and eventually write it to a CSV file.

It compiles ok with no errors but shows nothing. The data types that are published are 5 different uint16s but when I tried "from std_msgs.msg import uint16) and then use uint16 below I get an error so I went back to String in the sample code.

Am I on the right track here?

#!/usr/bin/env python
import roslib; roslib.load_manifest('sensorcsv')
import rospy
from std_msgs.msg import String
def callback(data):
    rospy.loginfo(rospy.get_name()+"I heard %s",data.data)
    print rospy.get_name()+"I heard %s",data.data

def listener():
    rospy.init_node('listener', anonymous=True)
    rospy.Subscriber("Adc", String, callback)
    rospy.spin()

if __name__ == '__main__':<br>
    listener()
2014-01-28 17:26:05 -0500 marked best answer Kinect camera not found with ROS

Installed Ubuntu 12 and Fuerte first and couldn't get the Kinect camera to show up. Reinstalled Ubuntu 11.10 and Electric and stepped line by line through installation guide and installed it by using sudo apt-get install ros-electric-openni-kinect.

When I tried to 'rosrun openni_launch openni.launch' I got permission errors from usblib (can't remember the exact error). Found the 55-primesense-usb.rules file and the permissions looked ok.

Tried to then install all the OpenNI drivers directly from the website http://www.pansenti.com/wordpress/?page_id=1740 and now when I run 'rosrun openni...' I get this error. After running through all those steps when I run the example I get this. /x86-Release$ sudo ./Sample-Players 503 INFO New log started on 2012-06-11 19:15:24 636 INFO OpenNI version is 1.5.2 (Build 23)-Linux-x86 (Dec 28 2011 17:53:48) 680 INFO --- Filter Info --- Minimum Severity: UNKNOWN One or more of the following nodes could not be enumerated:

I'm doing everything by the book and nothing is working. Any suggestions? I've been trying for 4 hours to get this camera working and am at my wits end.

2014-01-28 17:26:05 -0500 marked best answer rosserial install with fuerte?

Been trying to install rosserial with fuerte. Following the instructions here. http://www.ros.org/wiki/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup BTW, someone needs to add a sudo to the first command. Took me about 10 minutes to figure that out.

when I run rosmake rosserial_arduino I get this:

mkdir: cannot create directory `build': Permission denied

I tried chmod'ing the rosserial_arduino folder to 777 to see if that would fix it and it didn't. Any ideas.

2014-01-06 19:56:24 -0500 received badge  Famous Question (source)
2013-05-02 08:21:25 -0500 received badge  Notable Question (source)
2013-03-27 00:29:46 -0500 received badge  Famous Question (source)
2012-12-20 12:08:47 -0500 received badge  Famous Question (source)
2012-12-10 13:34:42 -0500 received badge  Notable Question (source)
2012-12-10 13:34:42 -0500 received badge  Famous Question (source)
2012-12-10 13:34:42 -0500 received badge  Popular Question (source)
2012-11-29 03:06:59 -0500 received badge  Famous Question (source)
2012-11-04 22:44:11 -0500 received badge  Popular Question (source)
2012-11-04 22:44:11 -0500 received badge  Notable Question (source)
2012-11-04 22:44:11 -0500 received badge  Famous Question (source)
2012-10-27 00:03:47 -0500 received badge  Famous Question (source)
2012-10-01 09:28:54 -0500 received badge  Famous Question (source)
2012-09-15 13:57:53 -0500 received badge  Popular Question (source)
2012-09-15 13:57:53 -0500 received badge  Notable Question (source)
2012-09-13 18:47:46 -0500 received badge  Popular Question (source)
2012-09-13 18:47:46 -0500 received badge  Notable Question (source)
2012-09-12 05:40:38 -0500 received badge  Popular Question (source)
2012-09-12 05:40:38 -0500 received badge  Notable Question (source)
2012-09-12 05:40:38 -0500 received badge  Famous Question (source)