Semidirect product of groupoids I am trying to understand the semidirect product of groupoids, as defined in this answer by Theo Johnson-Freyd.  Part of my difficulty is that although the definition of a 2-group makes sense, I am quite unfamiliar with that concept.  So, as a test, I 'computed' the crossed product of two (arbitrary) sets $X,Y$ seen as discrete groupoids.  My understanding is that the 2-group of automorphism in this case is the trivial monoidal category $(\mathbf{1}, \otimes, \ast)$, with $\mathbf{1}$ the trivial 1-object category, $\otimes:\mathbf{1}\times\mathbf{1}\rightarrow\mathbf{1}$, and unit the unique object $\ast$.
The object set of $X \rtimes Y$ is then $X \times Y$, and there is an arrow $(x_1,y_1) \rightarrow (x_2,y_2)$ iff $x_1=y_1$ and $x_2=y_2$, a long winded way of saying that in this particular case, $X \rtimes Y$ is (exactly) $X\times Y$ as a discrete groupoid.  Question 1: is this correct?
There is another case that I have not been able to work as successfully: given an equivalence relation $E_1$ on (set) $X$ seen as a groupoid, and equivalence relation $E_2$ on $Y$, what are $E_1 \rtimes E_2$ and $E_2 \rtimes E_1$ ?
[Edit: I meant semidirect product, not crossed]
 A: An action of a groupoid on another groupoid was defined in my paper "Groupoids as coefficients" Proc LMS (3) 25 (1972)  413-426, available here, which also uses methods of fibrations of groupoids.  The term "coefficients" refers to nonabelian cohomology.  This paper uses the term "split extension" instead of  semidirect product. The more modern  term is used given an  action of a group on a groupoid in the book  Topology and Groupoids, where it  is relevant to the explicit description  of orbit groupoids. Note that if a group acts on a space $X$, then it has an induced action on the fundamental groupoid $\pi_1 X$, and also on the groupoid $\pi_1(X,A)$ for any set $A$ of base points which is a union of orbits. 
A: The "crossed product" is not an operation on groupoids. Given one groupoid $G$, one can consider the category $G-Set$ of sets with a $G$-action (the classifying topos of $G$). Let $H$ be an internal groupoid in the category $G-Set$ (equivalently, a groupoid $H$ with an action of $G$). Then one can form a groupoid $G \ltimes H$ which comes equipped with a canonical functor $G\ltimes H \to G.$ This is actually a construction you (probably) already know:
The category $G-Set$ is the same as the category of functors from $G$ into $Set,$ or from $G^{op}$ into $Set$ since $G$ is a groupoid, these are the same. Hence, we can identify $G-Set$ with the category of presheaves on $G$. Therefore, $H$ is a groupoid object in presheaves, which is the same as a presheaf of groupoids. The functor $$G\ltimes H \to G$$ is the fibration arising from applying the Grothendieck construction of this presheaf of groupoids.
I give a description of this construction in the case of topological groupoids (under the name generalized action groupoids) here:
http://arxiv.org/abs/1011.6070
(See page 24)
