Skip to content

Headless sim: has no walls #254

@Carter90

Description

@Carter90

There is no spawning of walls in run_headless_sim.sh currently.

Can be solved by something like this, I will make a pull for a refactor of the headless sim.

spawn="rosrun gazebo_ros spawn_model -sdf -file $dir/simulation/models/"
addWalls(){
	local roundType=$1 #defalt is final
	echo -e "$cyan Adding Wallz for $roundType round $reset"
	size=11.55 #final wall's distance from collection disk's cener
	[ $roundType ==  "prelim" ] && size=7.5 #if prelim round, final wall's distance from collection disk's cener
	$spawn\barrier_$roundType\_round/model.sdf -model "Barrier_North" -x $size -y 0 -z 0 -R 0 -P 0 -Y 0
	$spawn\barrier_$roundType\_round/model.sdf -model "Barrier_West" -x 0 -y $size -z 0 -R 0 -P 0 -Y 1.570796
	$spawn\barrier_$roundType\_round/model.sdf -model "Barrier_East" -x 0 -y -$size -z 0 -R 0 -P 0 -Y 1.570796
	$spawn\barrier_$roundType\_round/model.sdf -model "Barrier_South" -x -$size -y 0 -z 0 -R 0 -P 0 -Y 0
	echo -e "$green Done Adding Wallz for $roundType round $reset"
} #end addWalls```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions