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

Frimann's profile - activity

2023-06-15 21:40:02 -0500 received badge  Famous Question (source)
2023-06-15 21:40:02 -0500 received badge  Notable Question (source)
2021-05-26 15:40:48 -0500 marked best answer How to trigger SMACH state transitions from another node

Hi

I'm using the SMACH state machine and want to trigger state changes from other nodes. For example from a keyboard node to ABORT the running process at any time.

One could of course do this by having the keyboard node send out an ABORT message on a topic and continuously monitor the given topic in each state, and induce a transition to an abort state if the ABORT message is received. But it sounds to me that it's to tedious to incorporate code in each state and at all waiting stages (for example while waiting for my laser to heat up or waiting for some other action to finish). Tedious and error prone.

Are there any other better ways to do this. Possibly some method to make this progress more event-driven.

regards - Frimann

2020-12-18 16:41:29 -0500 marked best answer Is SMACH unmaintained?

I see that the SMACH github page hasn't been updated for at least a year. Is SMACH depricated?


Update:

And if FlexBE is considered a better alterntative for a state machine?

I'm asking since SMACH (and smach_viewer) doesn't seem to have been updated for at least a year: https://github.com/ros/executive_smach

and FlexBE was updated just 2 months ago: https://github.com/team-vigir/flexbe_...

My project needs a state machine, but it's a very simple project when compared to running a whole robot. So we don't need anything fancy, just a simple state machine. But would prefer that it wouldn't get deprecated in a year or two.

2020-12-18 16:41:20 -0500 marked best answer Problem with tutorials

Hi

In the "Using the Statemachine Editor" tutorial one is told to go to configuration tab and do some stuff in the State Library window. The problem is that I don't see any State Libray window.

Here are the complete directions:

Start implementing the behavior by adding FlexBe built-in state library to your FlexBe App. This state library is included in flexbe_behavior_engine/flexbe_states/src/flexbe_states. Go to configuration tab, in State Library window click Add Folder and select your flexbe_states folder. This procedure is also performed to add another state library that other people made.

Is this something I can just ignore?

regards Frimann

2020-12-18 16:41:13 -0500 received badge  Famous Question (source)
2020-11-30 08:24:01 -0500 received badge  Nice Question (source)
2020-06-17 08:32:20 -0500 answered a question How to trigger SMACH state transitions from another node

Thanks for the reply. I switched to FlexBe long time ago, and liking the experience.

2020-06-15 17:23:43 -0500 received badge  Famous Question (source)
2020-05-27 14:04:12 -0500 received badge  Famous Question (source)
2020-04-15 09:14:28 -0500 received badge  Famous Question (source)
2020-04-15 09:14:28 -0500 received badge  Notable Question (source)
2020-03-03 08:47:13 -0500 received badge  Student (source)
2020-03-03 08:47:05 -0500 received badge  Popular Question (source)
2020-02-26 11:56:53 -0500 received badge  Notable Question (source)
2019-10-28 19:20:00 -0500 received badge  Famous Question (source)
2019-10-15 06:18:44 -0500 received badge  Famous Question (source)
2019-10-04 12:56:42 -0500 received badge  Notable Question (source)
2019-10-04 06:29:12 -0500 marked best answer Python socket connection seemingly dropping when using rospy

I'm controling a Henchel servo using Python and ROS through a socket, and I'm having some connection issues.

The servo works 99% of the time, responding to my commands. But 1% of the time my command doesn't seem to register, and all subsequent commands are ignored.

Now this sounds like an issue with the servo or my code, but I've tried to send various commands to the servo in a non-ROS python script over the course of a whole night, without hickups.

So there seems to be just by running my code in a ROS-node, I'm getting some strange behaviour.

I'm totally out of ideas, so I'm throwing out this vague quesion, whether anyone has some ideas what might be causing this? :)

Just to give some more background then here is an example from Henschel's website on how to communicate with this servo using the socket python packet:

import socket 
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.connect(('192.168.1.102', 1000))
    s.sendall(b'<control pos=\"1000\" speed=\"500\" current=\"200\" mode=\"129\" acc=\"1000\" decc=\"1000\" />')

Now I need to have the socket open 100% of the time since this servo is designed in such a way that it goes limb if it looses the socket connection. So in our code I do it like this:

import socket
tcp_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcp_sock.connect((servo_ip, tcp_port))
tcp_sock.settimeout(0.5)
tcp_sock.sendall(
    b'<control pos=\"{}\" speed=\"{}\" current=\"{}\" mode=\"{}\" acc=\"{}\" decc=\"{}\" />'.format(
        pos, speed, current, mode, accel, deaccel
    )

The strange thing is that we don't even receive an error. Not a socet timeout or anything. But the servo just stops receiving commands, and we need to restart our servo node.

Is it possible that just by running our code in a ROS environment, it will affect socket communications in some weird way?

2019-10-04 05:03:13 -0500 answered a question Python socket connection seemingly dropping when using rospy

Just for future reference I'm adding our solution to the problem. The servo in question was sending us constant positi

2019-10-04 03:21:36 -0500 received badge  Popular Question (source)
2019-10-01 04:39:13 -0500 edited question Python socket connection seemingly dropping when using rospy

Problems using a socket in ROS I'm controling a Henchel servo using Python and ROS through a socket, and I'm having some

2019-10-01 04:38:58 -0500 asked a question Python socket connection seemingly dropping when using rospy

Problems using a socket in ROS I'm controling a Henchel servo using Python and ROS through a socket, and I'm having some

2019-10-01 04:37:22 -0500 asked a question Socket communications failing in ROS

Socket communications failing in ROS I'm controling a Henchel servo using Python and ROS through a socket, and I'm havin

2019-10-01 04:37:21 -0500 asked a question Socket communications failing in ROS

Socket communications failing in ROS I'm controling a Henchel servo using Python and ROS through a socket, and I'm havin

2019-08-29 18:06:19 -0500 received badge  Notable Question (source)
2019-08-10 02:52:21 -0500 received badge  Enthusiast
2019-08-09 03:57:53 -0500 edited question Reloading state code without restarting FlexBE app

Reloading state code without restarting FlexBE app It seems that the main FlexBE app doesn't reload a state if I change

2019-08-09 03:57:53 -0500 received badge  Editor (source)
2019-08-09 03:56:43 -0500 asked a question Reloading state code without restarting FlexBE app

Reloading state code without restarting FlexBE app It seems that the main FlexBE app doesn't reload a state if I change

2019-08-07 07:06:59 -0500 commented answer How to get smach_viewer to work?

Thanks for the hint. I've switched to FlexBE, and so far so good!

2019-08-07 07:06:14 -0500 received badge  Popular Question (source)
2019-08-01 06:28:41 -0500 received badge  Popular Question (source)
2019-07-31 20:56:34 -0500 asked a question How to get smach_viewer to work?

How to get smach_viewer to work? I'm trying to get smach_viewer to work on Ubuntu 18.04 using ROS Melodic, and I'm spinn

2019-07-31 20:08:45 -0500 asked a question How to trigger SMACH state transitions from another node

How to trigger SMACH state transitions from another node Hi I'm using the SMACH state machine and want to trigger stat

2019-07-29 09:25:40 -0500 commented answer Is SMACH unmaintained?

Thank you for the answer. Glad to hear that Smach is not depricated. I decided on starting my project in Smach since I'm

2019-07-26 11:29:21 -0500 received badge  Famous Question (source)
2019-07-26 09:27:33 -0500 received badge  Notable Question (source)
2019-07-26 08:43:38 -0500 edited question Problem with tutorials

Problem with tutorials Hi In the "Using the Statemachine Editor" tutorial one is told to go to configuration tab and do

2019-07-26 07:29:20 -0500 answered a question Is SMACH unmaintained?

I’m wondering if SMACH is considered depricated? And if FlexBE is considered a better alterntative for a state machine?

2019-07-26 07:29:20 -0500 received badge  Rapid Responder (source)
2019-07-26 07:26:58 -0500 commented question Is SMACH depricated?

Sorry about that :)

2019-07-26 07:06:04 -0500 commented question Is SMACH depricated?

I've been adviced by the ppl at discourse.ros.org with accordance to the support guidelines at http://wiki.ros.org/Suppo

2019-07-25 16:37:32 -0500 received badge  Popular Question (source)
2019-07-25 12:12:24 -0500 received badge  Notable Question (source)
2019-07-25 09:34:14 -0500 asked a question Problem with tutorials

Problem with tutorials Hi In the "Using the Statemachine Editor" tutorial one is told to go to configuration tab and do

2019-07-24 22:57:29 -0500 received badge  Popular Question (source)
2019-07-24 22:57:27 -0500 received badge  Popular Question (source)
2019-07-24 11:05:40 -0500 asked a question Is SMACH depricated?

Is SMACH depricated? I see that the SMACH github page hasn't been updated for at least a year. Is SMACH depricated?