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

nickd's profile - activity

2023-03-15 13:44:38 -0500 received badge  Famous Question (source)
2022-06-04 14:25:29 -0500 received badge  Taxonomist
2022-05-11 00:41:15 -0500 marked best answer Is there a recommended way to control sequential logic and tasks (ROS2)

Hello,

Is there a recommended way to control logic in ROS when I want to do something in sequential order? I am using ROS2 on Ubuntu 20.04. Previously (without using ROS), I have written discrete controllers where I keep track of the state of my program and execute the appropriate commands in loops.

As an example, let's say I have a robot arm with a gripper and a camera. I want to do the following tasks in this order and only move on to the next task when the previous has finished 1) Close the gripper 2) Move the robot arm to a position (IK) 3) Run object detection routine with the camera.

I am pretty sure I can "hack" together a way to perform this routine with topics that act as flags that tell me when a task has finished but is there a better (more scalable) way that you recommend?

Thanks

2022-05-11 00:41:04 -0500 received badge  Notable Question (source)
2022-05-10 08:38:45 -0500 received badge  Popular Question (source)
2022-05-09 23:14:29 -0500 asked a question Is there a recommended way to control sequential logic and tasks (ROS2)

Is there a recommended way to control sequential logic and tasks (ROS2) Hello, Is there a recommended way to control lo

2020-07-18 14:13:41 -0500 received badge  Enlightened (source)
2020-07-18 14:13:41 -0500 received badge  Good Answer (source)
2020-05-02 06:54:07 -0500 received badge  Nice Answer (source)
2018-12-11 13:57:37 -0500 received badge  Teacher (source)
2018-03-10 11:55:47 -0500 received badge  Enthusiast
2018-02-11 10:02:05 -0500 answered a question sudo apt-get install ros-indigo-desktop-full (E: Unable to correct problems, you have held broken packages.)

Hi, I was having this problem with my installation earlier today although I was installing kinetic. I got around this

2014-03-21 19:52:24 -0500 commented answer Openni_tracker Illegal Instruction

hi, for me I was able to solve the issue by following the commands given in this post http://igorbarbosa.com/articles/how-to-install-kin-in-linux-mint-12-ubuntu/ and took the packages from here http://www.openni.org/openni-sdk/openni-sdk-history-2/

2013-10-18 18:42:47 -0500 received badge  Famous Question (source)
2013-09-24 07:31:00 -0500 received badge  Notable Question (source)
2013-08-19 06:29:20 -0500 received badge  Popular Question (source)
2013-08-05 11:57:33 -0500 asked a question import rospy when calling a python script from a c++ executable

I have a Robai Cyton gamma arm that I'm attempting to connect to with ROS by trying to call a Python script from a C++ program.

What I want to do is use C++ and OpenCV to get a video from an Xbox Kinect. From the kinect video I want to be able to click on a point in the image and send the x-y-z position (after converting them to my robot coordinate system) to a Python Script using OpenRave to figure out the inverse kinematics. After the position of my joint angles are known I want to use ROS to send them to the robot.

Currently, I can send the x-y-z locations and find the inverse kinematics no problem and everything works together nicely when I don't have import rospy in my python script(not trying to send the robot my joint angles). I also can move the robot with a different python script I have so I know I can connect with and move it.

Without the ROS commands to try to publish to the robot when I run the c++ exe I get the joint angles for the different links of my robot.

getIndicesFromJointNames [0] ['link1']
[ 1.          0.78545125  0.62655888  0.96602943  1.01751733  1.06180138
 -0.7132951 ]

When I add the command

import rospy

and subsequently try to publish them to the robot

> rospy.init_node('shoulder_roll')   
> ...
> ...
pub = rospy.Publisher('/theta_2/command', Float64)
pub.publish(Float64(sol.item(1)))
pub = rospy.Publisher('/theta_3/command', Float64)
pub.publish(Float64(sol.item(2)*-1)) 
pub = rospy.Publisher('/theta_4/command', Float64)
pub.publish(Float64(sol.item(3)))

I get the error

 Traceback (most recent call last):
  File "/home/nick/fuerte_workspace/Robai/bin/test.py", line 22, in run
    import rospy
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/client.py", line 53, in <module>
    import rospy.core
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/core.py", line 66, in <module>
    from rospy.names import *
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/names.py", line 86, in <module>
    _mappings = load_mappings(sys.argv)
AttributeError: 'module' object has no attribute 'argv'

Any help or suggestions would be appreciated

Thanks, Nick

2013-01-07 19:05:53 -0500 received badge  Autobiographer
2013-01-07 19:03:02 -0500 commented answer rosrun rviz failed in Groovy

i was getting the same error you were and "sudo pip uninstall rosdep" then "sudo apt-get install python-rosdep python-wstool build-essential" fixed it for me and "rosrun rviz rviz" works . I'm running ubuntu 12.04 and groovy.

2013-01-07 19:01:07 -0500 commented question Openni_tracker Illegal Instruction

in case anyone comes across this I was able to run openni_tracker by following the instructions on how to install kinect on ubuntu from http://igorbarbosa.com/articles/how-to-install-kin-in-linux-mint-12-ubuntu/ and using the links from http://www.openni.org/openni-sdk/openni-sdk-history-2/

2012-12-31 14:02:07 -0500 received badge  Scholar (source)
2012-12-31 08:01:51 -0500 received badge  Famous Question (source)
2012-12-30 19:41:41 -0500 commented answer Openni_tracker Illegal Instruction

I'm sorry I'm not really sure how to compile and execute that code in the link you sent me. I've been working on it for the past two nights but haven't really been able to figure out how to work with it.

2012-12-29 16:54:45 -0500 received badge  Notable Question (source)
2012-12-29 13:06:41 -0500 received badge  Supporter (source)
2012-12-29 12:41:02 -0500 received badge  Editor (source)
2012-12-29 12:39:27 -0500 commented answer Openni_tracker Illegal Instruction

I updated my original question with the output from running tracker in gdb. Now to figure out how to run and compile that link you sent me. I don't use Ubuntu unless I'm using ROS and I'm new to ROS Thanks for helping, I really appreciate it.

2012-12-29 12:00:36 -0500 received badge  Popular Question (source)
2012-12-29 09:14:20 -0500 received badge  Student (source)
2012-12-29 08:12:35 -0500 received badge  Organizer (source)
2012-12-29 07:49:45 -0500 asked a question Openni_tracker Illegal Instruction

Hi,

I'm trying to run openni_tracker and when I type "rosrun openni_tracker openni_tracker".

I get the output "Illegal instruction". I do know my kinect is working since I am able to run openni_launch and visualize the point cloud data.

I saw another post that says this is because of sse3
htt p://answers.ros.org/question/11927/illegal-instruction-in-openni_tracker-libxnvfeaturesso

I'm running a new laptop (AMD Turion(tm) II P540 Dual-Core Processor) and when I run "cat /proc/cpuinfo" I get the output of

flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr npt lbrv svm_lock nrip_save

I know it doesn’t say sse3 but I think that might be pni? Other than that I'm not really sure how to go about troubleshooting this error.

Thanks,


EDIT 1

output from gdb

(gdb) run
Starting program: /opt/ros/fuerte/stacks/openni_tracker/bin/openni_tracker 
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff131d700 (LWP 4222)]
[New Thread 0x7ffff0b1c700 (LWP 4223)]
[New Thread 0x7ffff031b700 (LWP 4224)]
[New Thread 0x7fffefb1a700 (LWP 4229)]
[New Thread 0x7fffecb5f700 (LWP 4235)]

Program received signal SIGILL, Illegal instruction.
0x00007fffed40abd3 in NAGeneralData::Downscale2x2SSE(unsigned short const*, unsigned short*, short, short, Box2D<int>*) () from /usr/lib/libXnVFeatures.so

EDIT 2 Thanks, when I ran the codes everything compiled and it ran for sse, sse2, and sse3. When I ran sse4.1, I received the output Illegal instruction (core dumped) and I wasn't able to compile sse4.2 (which would make sense because I don't think my cpu is supposed support that?)