prepare to train racecar using ZED camera pixels (CNN+DQN)

This commit is contained in:
Erwin Coumans
2017-06-13 16:04:50 -07:00
parent 0958e8f473
commit ee8fd56c5e
6 changed files with 228 additions and 3 deletions

View File

@@ -863,8 +863,8 @@ void PhysicsClientExample::stepSimulation(float deltaTime)
{
int xIndex = int(float(i)*(float(imageData.m_pixelWidth)/float(camVisualizerWidth)));
int yIndex = int(float(j)*(float(imageData.m_pixelHeight)/float(camVisualizerHeight)));
btClamp(yIndex,0,imageData.m_pixelHeight);
btClamp(xIndex,0,imageData.m_pixelWidth);
btClamp(yIndex,0,imageData.m_pixelHeight);
if (m_canvasDepthIndex >=0)
{

View File

@@ -1878,8 +1878,8 @@ void PhysicsServerExample::updateGraphics()
{
int xIndex = int(float(i)*(float(m_multiThreadedHelper->m_destinationWidth)/float(gCamVisualizerWidth)));
int yIndex = int(float(j)*(float(m_multiThreadedHelper->m_destinationHeight)/float(gCamVisualizerHeight)));
btClamp(yIndex,0,m_multiThreadedHelper->m_destinationWidth);
btClamp(xIndex,0,m_multiThreadedHelper->m_destinationHeight);
btClamp(xIndex,0,m_multiThreadedHelper->m_destinationWidth);
btClamp(yIndex,0,m_multiThreadedHelper->m_destinationHeight);
int bytesPerPixel = 4; //RGBA
if (m_canvasRGBIndex >=0)