Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rosbag recorder triggerd by arming #385

Closed
vooon opened this issue Sep 8, 2015 · 11 comments
Closed

rosbag recorder triggerd by arming #385

vooon opened this issue Sep 8, 2015 · 11 comments

Comments

@vooon
Copy link
Member

vooon commented Sep 8, 2015

I think it might be useful to start log recording on FCU arming.

@mhkabir
Copy link
Member

mhkabir commented Sep 8, 2015

I like it 💃
Ability to call custom rosbag record script would be nice as well. Till now, I had been manually doing this, but automation would be a plus.

@vooon vooon added this to the Version 0.15 milestone Sep 8, 2015
@vooon
Copy link
Member Author

vooon commented Sep 8, 2015

I'm actually think to make custom record script. As i know it is python-based, so i can base on it.
Alternatively we may to run program, in that case we may automate "do at arming event" anything.

@meuchel
Copy link

meuchel commented Sep 8, 2015

Because rosbag is anyway a standalone program I like more the generic one to be able to run any program.
If already on track with a module for event triggered actions you should also think about other events which could trigger something. E.g. disarm or others.

@vooon
Copy link
Member Author

vooon commented Sep 8, 2015

I checked rosbag and found that play and record is native binaries.
So generic only. Next thing is on what stack to write: python or c++.

Proposed config:

some_node: # only used in log
  event: armed # not sure that it needed, for now i only want armning
  action: run, stop # required, start on run, stop on disarm
  name: rosbag # optional, define node name
  restart: true # optional, restart? not sure that it'll be implemented soon
  output: log # optional, same as <node output="" />
  rosrun: rosbag record -a # like rosrun
some_script_1:
  event: armed
  shell: turn_off_wifi.sh # any executable, 
some_script_2:
  event: disarmed
  shell: turn_on_wifi.sh

@meuchel
Copy link

meuchel commented Sep 8, 2015

Looks good.
If there is rosrun there should be also roslaunch possible?

What about during same session if armed then disarmed and armed again?
Then e.g. script will be started again and user must take care of double start? (afaik rosrun handles this itself)
In this cases event: disarmed would make sense.

@vooon
Copy link
Member Author

vooon commented Sep 8, 2015

Perhaps roslaunch is too complex.

Yes, rosrun kills previous node with same name. That don't work for anonymous nodes.

Also first must be more verbose:

event: armed, disarmed
action: run, stop

@vooon
Copy link
Member Author

vooon commented Sep 8, 2015

http://wiki.ros.org/roslaunch/API%20Usage - helps a lot. Last thing - good name for that node.

eventlauncher?

@meuchel
Copy link

meuchel commented Sep 9, 2015

of course also integration of roslaunch would be nice.
Although all could be handled already only with the script option (including rosrun).
Regarding the name here some ideas:
event_handler_node
event_launcher_node
mavros_events_node

@vooon
Copy link
Member Author

vooon commented Sep 10, 2015

Shell-launcher complete. Unfortunate stdout/stderr logging do not work (break execution).

Example config: event_launcher.yaml

As you can see there was ability to define custom trigger for event.

event_name: # used in `event`
  service: service_path # std_srvs/Trigger

Next thing is rosrun.

vooon added a commit that referenced this issue Sep 10, 2015
ROSLaunch class wants all node operations from main thread.
That is not possible.
@vooon
Copy link
Member Author

vooon commented Sep 10, 2015

Hmm, implementing rosrun has problems.

I think that we may use shell nodes for all our needs.

vooon added a commit that referenced this issue Sep 10, 2015
vooon added a commit that referenced this issue Sep 10, 2015
@vooon
Copy link
Member Author

vooon commented Sep 10, 2015

Closed by #386.

Shell entries just works fine.

@vooon vooon closed this as completed Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants