<commit_before><?php
/**
 * Crowd Manipulation Interface Controller
 *
 * The Crowd Manipulation Interface controller. This interface will allow for navigation and manipulation controls.
 *
 * @author		<NAME> - <EMAIL>, <NAME> - <EMAIL>
 * @copyright	2014 Worcester Polytechnic Institute
 * @link		https://github.com/WPI-RAIL/CrowdManipulationInterface
 * @since		CrowdManipulationInterface v 0.0.1
 * @version		0.0.1
 * @package		app.Controller
 */
?>

<?php
//custom styling
echo $this->Html->css('CrowdManipulationInterface');
?>

<?php
// connect to ROS
echo $this->Rms->ros($environment['Rosbridge']['uri']);

// setup the TF client
echo $this->Rms->tf(
	$environment['Tf']['frame'],
	$environment['Tf']['angular'],
	$environment['Tf']['translational'],
	$environment['Tf']['rate']
);
?>

<section class='wrapper style4'>
	<div class='content center'>
		<section>
			<div class='row'>
				<div class='12u'>
					<h3 id='queue-status'></h3>
				</div>
			</div>
		</section>
		<div class='overlay hidden' id='tutorial'>
			<div class='highlight' id='welcome-highlight'>
				<strong>
					Welcome! Press next to proceed to the next instruction.
				</strong>
			</div>
			<div class='highlight' id='urdf_highlight'>
				control the robot's arm by dragging the arrows, or spinning the rings.
				<br/>
				Click on the green markers to drive to fixed locations.
			</div>
			<div class='highlight' id='buttons_highlight'>
				Clicking these buttons will control the arm.
				<br/>
				Segment will look for objects and add them to the 3D world.
			</div>
			<div class='highlight' id='keyboard-highlight'>
				Drive the robot with the <strong>W, A, S, D</strong> keys
				<br/>
				Tilt the camera with <strong>Up</strong> and <strong>Down</strong> keys
			</div>
			<div class='highlight' id='feedback-highlight'>
				Feedback may appear if something goes wrong
			</div>
			<button id='next' class='button'>Next</button>
		</div>
		<div class='row' id='main-content'>
			<div id='important-feedback' class='feedback-overlay hidden'>
				<h1>ERROR: ...</h1>
			</div>
			<div id='fatal-feedback' class='feedback-overlay fatal hidden'>
				<h1>FATAL ERROR: ...</h1>
			</div>
			<div class='6u'>
				<div id='viewer'>
				</div>
			</div>
			<div class='6u stream'>
				<div id='mjpeg'>
				</div>
			</div>
		</div>
		<div class='row'>
			<section class='4u'>
				<a href='#' class='button fit' id='segment'>Recognize Objects</a>
				<br/>
				<a href='#' class='button fit' id='ready'>Ready Arm</a>
				<br/>
				<a href='#' class='button fit' id='retract'>Retract Arm</a>
			</section>
			<section class='4u'>
				Use the <strong>W, A, S, D</strong> keys to drive the robot. Use the <strong>arrow keys</strong> to
				move the camera.Use the <strong>3D interface</strong> to control the arm. Right clicking the gripper
				will
				provide additional
				actions.
			</section>
			<section class='4u'>
				<div id='feedback'>
				</div>
				<button id='clearFeedback' class='button special'>clear</button>
			</section>
		</div>
	</div>
</section>

<script>
	var size = Math.min(((window.innerWidth / 2) - 120), window.innerHeight * 0.60);
	<?php
		$streamTopics = '[';
		$streamNames = '[';
		foreach ($environment['Stream'] as $stream) {
			$streamTopics .= "'" . $stream['topic'] . "', ";
			$streamNames .= "'" . $stream['name'] . "', ";
		}
		// remove the final comma
		$streamTopics = substr($streamTopics, 0, strlen($streamTopics) - 2);
		$streamNames = substr($streamNames, 0, strlen($streamNames) - 2);
		$streamTopics .= ']';
		$streamNames .= ']';
	?>
	new MJPEGCANVAS.MultiStreamViewer({
		divID: 'mjpeg',
		host: '<?php echo $environment['Mjpeg']['host'].":".$environment['Mjpeg']['port']; ?>',
		width: size,
		height: size * 0.85,
		quality: <?php echo ($environment['Stream'][0]['quality']) ? $environment['Stream'][0]['quality'] : '90'; ?>,
		topics: <?php echo $streamTopics; ?>,
		labels: <?php echo $streamNames; ?>
	});

	_VIEWER = new ROS3D.Viewer({
		divID: 'viewer',
		width: size,
		height: size * 0.85,
		antialias: true,
		background: '#50817b',
		intensity: 0.660000
	});
</script>
<commit_msg>bug fix<commit_after><?php
/**
 * Crowd Manipulation Interface Controller
 *
 * The Crowd Manipulation Interface controller. This interface will allow for navigation and manipulation controls.
 *
 * @author		<NAME> - <EMAIL>, <NAME> - <EMAIL>
 * @copyright	2014 Worcester Polytechnic Institute
 * @link		https://github.com/WPI-RAIL/CrowdManipulationInterface
 * @since		CrowdManipulationInterface v 0.0.1
 * @version		0.0.1
 * @package		app.Controller
 */
?>

<?php
//custom styling
echo $this->Html->css('CrowdManipulationInterface');
?>

<?php
// connect to ROS
echo $this->Rms->ros($environment['Rosbridge']['uri']);

// setup the TF client
echo $this->Rms->tf(
	$environment['Tf']['frame'],
	$environment['Tf']['angular'],
	$environment['Tf']['translational'],
	$environment['Tf']['rate']
);
?>

<section class='wrapper style4'>
	<div class='content center'>
		<section>
			<div class='row'>
				<div class='12u'>
					<h3 id='queue-status'></h3>
				</div>
			</div>
		</section>
		<div class='overlay hidden' id='tutorial'>
			<div class='highlight' id='welcome-highlight'>
				<strong>
					Welcome! Press next to proceed to the next instruction.
				</strong>
			</div>
			<div class='highlight' id='urdf_highlight'>
				control the robot's arm by dragging the arrows, or spinning the rings.
				<br/>
				Click on the green markers to drive to fixed locations.
			</div>
			<div class='highlight' id='buttons_highlight'>
				Clicking these buttons will control the arm.
				<br/>
				Segment will look for objects and add them to the 3D world.
			</div>
			<div class='highlight' id='keyboard-highlight'>
				Drive the robot with the <strong>W, A, S, D</strong> keys
				<br/>
				Tilt the camera with <strong>Up</strong> and <strong>Down</strong> keys
			</div>
			<div class='highlight' id='feedback-highlight'>
				Feedback may appear if something goes wrong
			</div>
			<button id='next' class='button'>Next</button>
		</div>
		<div class='row' id='main-content'>
			<div id='important-feedback' class='feedback-overlay hidden'>
				<h1>ERROR: ...</h1>
			</div>
			<div id='fatal-feedback' class='feedback-overlay fatal hidden'>
				<h1>FATAL ERROR: ...</h1>
			</div>
			<div class='6u'>
				<div id='viewer'>
				</div>
			</div>
			<div class='6u stream'>
				<div id='mjpeg'>
				</div>
			</div>
		</div>
		<div class='row'>
			<section class='4u'>
				<a href='#' class='button fit' id='segment'>Recognize Objects</a>
				<br/>
				<a href='#' class='button fit' id='ready'>Ready Arm</a>
				<br/>
				<a href='#' class='button fit' id='retract'>Retract Arm</a>
			</section>
			<section class='4u'>
				Use the <strong>W, A, S, D</strong> keys to drive the robot. Use the <strong>arrow keys</strong> to
				move the camera.Use the <strong>3D interface</strong> to control the arm. Right clicking the gripper
				will
				provide additional
				actions.
			</section>
			<section class='4u'>
				<div id='feedback'>
				</div>
				<button id='clearFeedback' class='button special'>clear</button>
			</section>
		</div>
	</div>
</section>

<script>
	var size = Math.min(((window.innerWidth / 2) - 120), window.innerHeight * 0.60);
	<?php
		$streamTopics = '[';
		$streamNames = '[';
		foreach ($environment['Stream'] as $stream) {
			$streamTopics .= "'" . $stream['topic'] . "', ";
			$streamNames .= "'" . $stream['name'] . "', ";
		}
		// remove the final comma
		$streamTopics = substr($streamTopics, 0, strlen($streamTopics) - 2);
		$streamNames = substr($streamNames, 0, strlen($streamNames) - 2);
		$streamTopics .= ']';
		$streamNames .= ']';
	?>
	new MJPEGCANVAS.MultiStreamViewer({
		divID: 'mjpeg',
		host: '<?php echo $environment['Mjpeg']['host']; ?>',
		port: <?php echo $environment['Mjpeg']['port']; ?>',
		width: size,
		height: size * 0.85,
		quality: <?php echo ($environment['Stream'][0]['quality']) ? $environment['Stream'][0]['quality'] : '90'; ?>,
		topics: <?php echo $streamTopics; ?>,
		labels: <?php echo $streamNames; ?>
	});

	_VIEWER = new ROS3D.Viewer({
		divID: 'viewer',
		width: size,
		height: size * 0.85,
		antialias: true,
		background: '#50817b',
		intensity: 0.660000
	});
</script>

{'fraction_non_alphanumeric': 0.1855881997340104, 'fraction_numerical': 0.014508523757707652, 'mean_word_length': 3.681380871533673, 'pattern_counts': {'":': 1, '<': 194, '<?xml version=': 0, '>': 206, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1449721', 'n_tokens_mistral': 3339, 'n_tokens_neox': 2805, 'n_words': 747}