Network connection between two laptops communication problem?

view story

http://askubuntu.com – I have two laptops (both wifi enabled) and a wireless router. I want to use one of the laptop on a robot and other laptop to SSH into the first one. My question is that is it possible to connect the two pcs even if I dont have a modem or internet and just use the wifi router? If so how to do that? I learned about the ad-hoc network, but i am unable to create an ad-hoc network on my macbook pro 6'2 with ubuntu 11.10, so i need an alternate method. Please help. (HowTos)