Top/SandBox2
English | Japanese
English | Japanese

Menu

  • Top
  • Search 検索
  • Writers 著者リスト
  • Online forum フォーラム
↑

Recent

2021-08-17
  • os/Linux
2019-01-17
  • eq/LulzBot
2018-12-10
  • dev/Motoman
2018-07-05
  • tool/Git
2018-05-02
  • lib/Eigen
  • writer/Ilya_Ardakani
2018-04-26
  • lib/Deformable_Simulators
  • Top
2018-04-23
  • writer/Naoya_Chiba
  • MenuBar
  • writer
2018-04-22
  • lang/Python
2018-04-21
  • lang/C++
2018-04-19
  • Editor(editor)/Assignment
  • Editor(editor)
  • lang/C++/Exercise
2018-04-18
  • SandBox2
  • lang/Python/Exercise
  • soft/FreeCAD
  • lib/Chainer
Access: 1/1117 - Editor / Admin

Test page

This is a test

テストページ

これはテスト

Abstract 概要
This is an abstract.
Table of contents 目次
  • Table style 表スタイル
  • Lang switch
  • Code highlight
    • Importing and highlighting code from GitHub
    • Attaching source code and highlighting
    • Writing code directly
    • No highlighting
  • Equation
  • Media
    • Image
    • YouTube video

Table style 表スタイル †

aaaaabbbccccddd
hogehoge
xxhg
↑

Lang switch †

  • 言語: Japanese | English Language: Japanese | English;

これは日本語の文章です.

  C=(A+B)*C-C;  // 複雑な演算

This is English statements.

  C=(A+B)*C-C;  // complex computations
↑

Code highlight †

↑

Importing and highlighting code from GitHub †

Code on GitHub

#include "simpleode/lib/arm.h"
#include <iostream>
using namespace std;

void test_ctrl(xode::TEnvironment &env, xode::TDynRobot &robot)
{
  dReal target[3]={0.5,0.8,0.8};

  // robot.Body().back().addForce (0.1*(std::sin(env.Time())+1.0), 0.1*(std::sin(env.Time()*1.7)+1.0) ,0.1*(std::sin(env.Time()*0.7)+1.0));

  target[0]= std::sin(env.Time());
  target[1]= 0.5*(std::sin(0.2+2.0*env.Time())+1.0);
  target[2]= 1.57*0.5;

  const double kp(5.0);
  for(int j(0);j<3;++j)
    robot.SetAngVelHinge(j,kp*(target[j]-robot.GetAngleHinge(j)));

  // const double kp(0.2),kd(0.02);
  // for(int j(0);j<3;++j)
  //   robot.AddTorqueHinge(j,kp*(target[j]-robot.GetAngleHinge(j))-kd*robot.GetAngVelHinge(j));

  cerr<<robot.GetAngleHinge(0)<<" "<<robot.GetAngleHinge(1)<<" "<<robot.GetAngleHinge(2)<<endl;
}

static dVector3 KeyboardShperePos={0,0,1};

void test_draw(xode::TEnvironment &env, xode::TDynRobot &robot)
{
  dReal sides[3]={0.3,0.3,0.3};
  dsSetColorAlpha (0.0, 1.0, 1.0, 0.5);
  dsDrawBox (robot.GetHandPos(), robot.GetHandRot(), sides);
  dsSetColorAlpha (1.0, 0.0, 1.0, 0.5);
  // dsDrawSphere (KeyboardShperePos, robot.GetHandRot(), 0.2);
}

void test_keyevent(xode::TEnvironment &env, xode::TDynRobot &robot, int command)
{
  dReal d(0.05);
  switch(command)
  {
  case 'd': KeyboardShperePos[0]+=d; break;
  case 'a': KeyboardShperePos[0]-=d; break;
  case 'w': KeyboardShperePos[2]+=d; break;
  case 's': KeyboardShperePos[2]-=d; break;
  case 'e': KeyboardShperePos[1]+=d; break;
  case 'q': KeyboardShperePos[1]-=d; break;
  }
}

int main (int argc, char **argv)
{
  xode::TEnvironment env;
  dsFunctions fn= xode::SimInit("textures",env);
  // dsFunctions fn= xode::SimInit("/home/akihiko/proj/skyai/benchmarks/humanoid01/m/textures_w",env);
  xode::ControlCallback= &test_ctrl;
  xode::DrawCallback= &test_draw;
  xode::KeyEventCallback= &test_keyevent;

  dsSimulationLoop (argc,argv,400,400,&fn);

  dCloseODE();
  return 0;
}
↑

Attaching source code and highlighting †

This is the reference of attached file: fileround.cpp

Other reference style:

fileround.cpp

Highlighting the file content:

fileround.cpp

#include <cmath>
#include <iostream>
using namespace std;
int main()
{
  for(double x(-5.0); x<5.0; x+=0.01)
    cout<<x<<" "<<round(x)<<endl;
  return 0;
}
↑

Writing code directly †

#!/bin/bash
# src: http://taka.no32.tk/diary/20050826.html
KEY=`echo $@ | nkf -w -w80`
↑

No highlighting †

 % chmod 600 secrete_file
↑

Equation †

Use the math plugin:

\$$$ y = \int{( x^2 + \sin{(\log{x})} )dx} \$$$
↑

Media †

↑

Image †

Embedding an image with zooming:

QR-AkihikoY.png
Caption caption...

Embedding image uploaded in other page:

ROS_overview.png
Caption caption...

Embedding image from external server (BE CAREFUL to use external server! It will increase the load of the server):

digest-lfdpour.png
Caption caption...
↑

YouTube video †


Last-modified:2018-04-18 (Wed) 20:21:47 (2641d)
Link: Editor(editor)(2640d)
Site admin: Akihiko Yamaguchi.
Written by: Akihiko Yamaguchi.
System: PukiWiki 1.5.0. PHP 5.2.17. HTML conversion time: 1.414 sec.