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

Any brief tutorial??? #16

Open
hangil2478 opened this issue Jan 2, 2018 · 22 comments
Open

Any brief tutorial??? #16

hangil2478 opened this issue Jan 2, 2018 · 22 comments

Comments

@hangil2478
Copy link

Hi.

It seems that the source code is not maintained after sometime.

Could you please explain us with some examples to demonstrate how we can run the multi-robot exploration example just like shown in your video (https://www.youtube.com/watch?v=md29t2Xbdug)?

We just want to run it in virtualized world first.

Thanks.

@hangil2478 hangil2478 changed the title Brief Tutorial Any brief tutorial??? Jan 2, 2018
@dkkim93
Copy link

dkkim93 commented Mar 14, 2018

Yes please. If there would be a tutorial or simple example how to run, it would be great!
Thank you.

@LeoSko
Copy link

LeoSko commented Mar 14, 2018

For others who also want to see at least something unless maintainers respond here. Some time ago our team created a couple launch-files that at least work and can be used for a start.

The first one is just one robot in stage, which explore it by itself (here). The other most point we reached was grouping several robots manually using adhoc_communication services, where we used this file to start with.

Beware that it needs my own modification of teleop_twist_keyboard

@npapadimitriou
Copy link

Do anyone may have any .launch file for real hardware?? I use 2 turtlebot2 with indigo but their exploration is reaaally slow and I am having difficulties in understanding if I have to start more nodes that in simulation mode or if there are any parameters that I have to configure inside source files . Thanks in advance!!

@YCH188
Copy link

YCH188 commented Jan 8, 2019

@LeoSko Hello,I run the
roslaunch explore explore_one.launch
but get errors
Could you help tell me what is the prolem and how to solve it? Thanks a lot!

[robot_0-4] process has died [pid 2432, exit code 1, cmd /home/ych/adhoc/multibot/adhoc_communication/build/devel/lib/adhoc_communication/adhoc_communication /robot_0/adhoc_communication/new_robot:=/adhoc_communication/new_robot /robot_0/adhoc_communication/remove_robot:=/adhoc_communication/remove_robot /robot_0/base_pose_ground_truth:=/base_pose_ground_truth /robot_0/adhoc_communication/send_frontier:=/adhoc_communication/send_frontier /robot_0/adhoc_communication/send_auction:=/adhoc_communication/send_auction __name:=robot_0 __log:=/home/ych/.ros/log/5db71998-1327-11e9-a4f9-2c337a5bf879/robot_0-4.log].
log file: /home/ych/.ros/log/5db71998-1327-11e9-a4f9-2c337a5bf879/robot_0-4*.log
[robot_0-4] restarting process
process[robot_0-4]: started with pid [2914]
socket():: Operation not permitted
[ INFO] [1546939542.503405243, 0.500000000]: Loading from pre-hydro parameter style
[ INFO] [1546939542.562599330, 0.500000000]: Using plugin "static_layer"
[ INFO] [1546939542.578536548, 0.500000000]: Requesting the map...
[robot_0-4] process has died [pid 2914, exit code 1, cmd /home/ych/adhoc/multibot/adhoc_communication/build/devel/lib/adhoc_communication/adhoc_communication /robot_0/adhoc_communication/new_robot:=/adhoc_communication/new_robot /robot_0/adhoc_communication/remove_robot:=/adhoc_communication/remove_robot /robot_0/base_pose_ground_truth:=/base_pose_ground_truth /robot_0/adhoc_communication/send_frontier:=/adhoc_communication/send_frontier /robot_0/adhoc_communication/send_auction:=/adhoc_communication/send_auction __name:=robot_0 __log:=/home/ych/.ros/log/5db71998-1327-11e9-a4f9-2c337a5bf879/robot_0-4.log].
log file: /home/ych/.ros/log/5db71998-1327-11e9-a4f9-2c337a5bf879/robot_0-4*.log
[robot_0-4] restarting process
process[robot_0-4]: started with pid [3107]
socket():: Operation not permitted

@LeoSko
Copy link

LeoSko commented Jan 10, 2019

@YCH188 for sure, this is some permissions problem (socket():: Operation not permitted). It has been a long time, but I remember you should try using sudo or root user to launch packages. This is needed because adhoc_communication uses raw unix sockets that are not available for usual users.

@YCH188
Copy link

YCH188 commented Jan 11, 2019

@LeoSko Thank you. Another problem is that in the launch file, the [robot_0-4] isn't started, why it says [robot_0-4] process has died.

@LeoSko
Copy link

LeoSko commented Jan 11, 2019

@YCH188, is there anything in specified log file?

@YCH188
Copy link

YCH188 commented Jan 11, 2019

The log are as below:
the robot_0-4 died and restart.

[robot_0-4] process has died [pid 2432, exit code 1, cmd /home/ych/adhoc/multibot/adhoc_communication/build/devel/lib/adhoc_communication/adhoc_communication /robot_0/adhoc_communication/new_robot:=/adhoc_communication/new_robot /robot_0/adhoc_communication/remove_robot:=/adhoc_communication/remove_robot /robot_0/base_pose_ground_truth:=/base_pose_ground_truth /robot_0/adhoc_communication/send_frontier:=/adhoc_communication/send_frontier /robot_0/adhoc_communication/send_auction:=/adhoc_communication/send_auction __name:=robot_0 __log:=/home/ych/.ros/log/5db71998-1327-11e9-a4f9-2c337a5bf879/robot_0-4.log].
log file: /home/ych/.ros/log/5db71998-1327-11e9-a4f9-2c337a5bf879/robot_0-4*.log
[robot_0-4] restarting process
process[robot_0-4]: started with pid [2914]

@LeoSko
Copy link

LeoSko commented Jan 11, 2019

@YCH188, if this is the only content of /home/ych/.ros/log/5db71998-1327-11e9-a4f9-2c337a5bf879/robot_0-4*.log, then I suggest you to look up how to increase logLevel for components to the most verbose (TRACE probably) and see if there is something useful.

@YCH188
Copy link

YCH188 commented Jan 12, 2019

@LeoSko OK, I will try. Thank you.

@Prab09
Copy link

Prab09 commented Apr 27, 2019

@LeoSko Hello,
I am getting this error:
ERROR: cannot launch node of type [adhoc_communication/adhoc_communication]: can't locate node [adhoc_communication] in package [adhoc_communication]
when I launch adhoc_communication.
How do I solve this?
Thanks!

@LeoSko
Copy link

LeoSko commented Apr 27, 2019

@Prab09, this is a basic error - ROS can't locate module (aka node) or package. You need to get used to ROS packages system first. Carefully read packages wiki page and complete tutorials first (Beginners №№1-5, Intermediate №1).

@Prab09
Copy link

Prab09 commented Apr 28, 2019

@LeoSko alright fixed that issue. Thanks!
However, when I run the file adhoc_communication.launch, I get the following error.
prab@prab-VivoBook-ASUS:~/catkin_ws$ roslaunch adhoc_communication adhoc_communication.launch... logging to /home/prab/.ros/log/1407f2c8-697f-11e9-952e-80c5f2ca1789/roslaunch-prab-VivoBook-ASUS-9485.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://prab-VivoBook-ASUS:42567/

SUMMARY

PARAMETERS

  • /adhoc_communication/enable_cooperative_relaying: True
  • /adhoc_communication/interface: lo
  • /adhoc_communication/log_path: /home/prab/logs
  • /adhoc_communication/mac:
  • /adhoc_communication/max_packet_size: 10000000
  • /adhoc_communication/nack_threshold: 10
  • /adhoc_communication/num_e2e_retrans: 10
  • /adhoc_communication/num_link_retrans: 2
  • /adhoc_communication/robot_name:
  • /adhoc_communication/robots_in_simulation: 10
  • /adhoc_communication/sim_robot_macs:
  • /adhoc_communication/simulation_mode: False
  • /adhoc_communication/tx_power:
  • /adhoc_communication/use_sim_time: False
  • /rosdistro: kinetic
  • /rosversion: 1.12.14

NODES
/
adhoc_communication (adhoc_communication/adhoc_communication)

auto-starting new master
process[master]: started with pid [9495]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 1407f2c8-697f-11e9-952e-80c5f2ca1789
process[rosout-1]: started with pid [9509]
started core service [/rosout]
process[adhoc_communication-2]: started with pid [9525]
Error for wireless request "Set Tx Power" (8B26) :
SET failed on device lo ; Operation not permitted.
[ERROR] [1556433025.021522716]: Cannot create directory "/adhoc_communication/prab-VivoBook-ASUS/".

I am also in root. Any idea how to fix this would be much appreciated. Thanks!

@LeoSko
Copy link

LeoSko commented Apr 28, 2019

@Prab09, that is a tricky one. Since it was a long time ago, the only thing I remember is that username or PC's name for current computer should not contain dashes (-), this is probably the case here (who knows, why?😞).

You could also try to:

  • set finer level of logs (e.g. DEBUG)
  • create directory /adhoc_communication/prab-VivoBook-ASUS/ by yourself
  • recompile package to add some debug output where it tries to create directory

@Prab09
Copy link

Prab09 commented Apr 28, 2019

@LeoSko, alright I will try that out. Thanks for your help!

@Prab09
Copy link

Prab09 commented Oct 17, 2019

Hi @LeoSko!
Hoping you could help us with our issue.
We are trying to use the adhoc communication package to publish other robots positions to a topic.
The adhoc_comm.cpp file states that there is a field for the topic to publish the message.
publishMessage(pos, p->topic_position) (assuming this is the field from the publishpacket function)
We also edited the packet cpp and h file that includes the topic to publish.
Also, created a topic in the header file.
When we run the simulation_2..launch and do rostopic echo /robot_0/adhoc_communication/position
we get the following: no messages received

Thank you!
Prabjot

@LeoSko
Copy link

LeoSko commented Oct 17, 2019

@Prab09, since it was more than 3 years ago can't guarantee anything, but can take a look at your code if you provide a link to specific commit/branch to make it more specific.

@Prab09
Copy link

Prab09 commented Oct 18, 2019

Hi @LeoSko
So we created position topic and we are able call the service sendposition.
image

Seems like it is publishing correctly. We will now try to create a callback function within the node as well as a topic for the messages to be published to.

If we receive any error I will post it to this forum.

@Prab09
Copy link

Prab09 commented Oct 18, 2019

also should this error be concerning

image

@LeoSko
Copy link

LeoSko commented Oct 19, 2019

@Prab09, I see that you are making progress - very good. However, I can't help you anymore since I never dug this far into sources. In the last error it is obvious client topic expects another datatype, but I'm sure you already read that. :)

@aa624545345
Copy link

Hello, i try many times but still can not launch the file successfully, can anyone tell me how this project implement the adhoc communition? use service or topic? Thanks so much.

@Siwy31a
Copy link

Siwy31a commented Mar 24, 2022

Hello, I know it's been a long time but maybe someone can help me. I am trying to communicate using adhoc_communication package but I am not sure if I am using it correctly.
Which lounchfile should I use to do decentralized communication: adhoc.launch, adchoc_communication.launch or maybe adchoc_communication.cpp?
When I run adhoc_communication.alunch on two computers, I can see that they are visible to each other, but I don't know if correct:

NODES
/
adhoc_communication (adhoc_communication/adhoc_communication)

ROS_MASTER_URI=http://localhost:11311

process[adhoc_communication-1]: started with pid [18976]
[ERROR] [1648132387.364590053]: NEW NEIGHBOR: NAME[turtlebot2-lenovo-1]

Should the Topics of both robots be visible to each other now?
Maybe someone has some tutorial on how to use the adhoc_communication package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants